Commit graph

29 commits

Author SHA1 Message Date
Aneesh Agrawal
f07d8f188a Add lint for [ instead of [[ in shells scripts 2016-08-05 09:42:04 -04:00
Aneesh Agrawal
9231ca1c69 Add lint to ensure substitutions use the full form
Check that any variable substitutions use the full ${VAR} form,
not just $VAR (but don't check for quoting yet).
2016-08-05 09:29:10 -04:00
Aneesh Agrawal
79ef9b4efc Add lint for backticks in shell scripts
The "$(some_command arg1 arg2)" form is preferred to the
`some_command arg1 arg2` form because it nests unambiguously.
Add a lint for this to tidy.
2016-08-05 09:29:09 -04:00
bors-servo
4bc629b369 Auto merge of #12295 - jimberlage:12158/shell-linting, r=aneeshusa
Add linting for shell scripts

<!-- Please describe your changes on the following line: -->

This changes tidy to check shell scripts for the proper shebang and
options.  It does not check that variables are formatted correctly.  It
also adds a check for the MPL 2.0 license in shell scripts.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12158 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12295)
<!-- Reviewable:end -->
2016-08-04 12:31:17 -05:00
bors-servo
81a1e28da1 Auto merge of #12567 - servo:tidy-self-test-result, r=jdm
Return failure if the tidy self-tests fail.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12567)
<!-- Reviewable:end -->
2016-07-24 02:51:25 -05:00
Ms2ger
3548b5edd0 Return failure if the tidy self-tests fail. 2016-07-23 15:29:06 +02:00
Simon Martin
c35cf9ad8a Issue #12564: Fix "./mach test-tidy --self-test". 2016-07-23 14:41:48 +02:00
Jim Berlage
7952bd00b6 Add linting for shell scripts
This changes tidy to check shell scripts for the proper shebang and
options.  It does not check that variables are formatted correctly.  It
also adds a check for the MPL 2.0 license in shell scripts.
2016-07-22 11:53:14 -05:00
Owen Coutts
ff4cb7f80a [tidy] check for duplicate keys in .json files 2016-07-08 11:12:12 +02:00
Owen Coutts
28399d0877 [tidy] Add test for existing json functionality 2016-07-07 17:07:03 +02:00
Travis Dean
6642358217 Add style check, test, and code fixes for an else brace check. 2016-07-04 18:38:13 -04:00
Ravi Shankar
dfe32b0ada Removed unused function and minor cleanup 2016-06-16 00:07:21 +05:30
bors-servo
bc2f4c3450 Auto merge of #11621 - h4xr:mach_fix, r=Wafflespeanut
Make mach test-tidy consider ignored dirs

Made changes so that mach test-tidy considers the ignored directories

Fixes #11386

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11621)
<!-- Reviewable:end -->
2016-06-14 23:33:52 -05:00
Saurabh Badhwar
28312d0e17 Make mach consider ignored dirs
Address indentation changes
2016-06-15 09:58:04 +05:30
bors-servo
93f137f06d Auto merge of #11190 - mrmiywj:Root-tidy-checker, r=jdm
add &Root<T> checker

Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data:
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11137  (github issue number if applicable).

Either:
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11190)
<!-- Reviewable:end -->
2016-06-05 08:48:58 -05:00
mrmiywj
a17ae72414 add &Root<T> checker
update rust_tidy tests

update rust_tidy.rs and test_tidy.py
2016-06-05 15:43:35 +08:00
Josh Matthews
4ebc065cba Warn about empty lines following an open brace. 2016-05-27 13:30:51 -04:00
Cullen Rhodes
40acd24e8f Report use statements that use {} with only one entry 2016-05-27 10:18:44 +01:00
aeischeid
fa4665e2a7 add tidy test for 'missing space after :' in stucts 2016-05-11 16:19:17 -05:00
askeing
33d8e21cff Adding parameter to tidy for skipping print text when running tests 2016-04-26 01:27:08 +09:00
Maciej Skrzypkowski
f090425c24 Test for tidy.check_lock function #9152 2016-04-25 08:32:52 +02:00
bors-servo
04f8ae56db Auto merge of #10786 - zwn:tidy-modelines, r=Manishearth
tidy check for vim and emacs modelines

See #10719.

It skips *.webidl files for now since I am not sure where they come from and if they should be edited in tree or not.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10786)
<!-- Reviewable:end -->
2016-04-22 21:46:30 -07:00
Zbynek Winkler
39780ca39f Report lines starting with &&. 2016-04-22 14:28:20 +02:00
Zbynek Winkler
b6b8ac6cd3 tidy check for vim and emacs modelines.
See https://github.com/servo/servo/issues/10719.
2016-04-21 17:52:09 +02:00
Josh Matthews
c7d5a2b311 Ensure that we aren't missing any errors in the tidy self-test. 2016-04-20 13:29:39 -04:00
askeing
27bac667b2 Modified test_spec_link of test_tidy for packaged tidy 2016-04-17 04:20:24 +09:00
Maciej Skrzypkowski
22d991d4e0 Test for check_spec function, for tidy.py #9152 2016-04-17 04:12:54 +09:00
askeing
8c4c899ef9 Modified the servo_tidy_tests for both "./mach" and "make test"
- fix `cd python/tidy; make test` fail issue
2016-04-14 21:19:16 +09:00
askeing
bfe460de9e Package tidy
- Modified the testing commands
- Added the requirements
- Moved python/tidy/tests to python/tidy/servo_tidy_tests for self tidy tests
2016-04-14 15:55:25 +08:00
Renamed from python/tidy/tests/test_tidy.py (Browse further)