Commit graph

99 commits

Author SHA1 Message Date
Sadman Kazi
cca3343c2e Check for merge commits with tidy
Increase merge commit check range under travis

Add comment on why travis workaround is necessary
2017-04-13 15:57:36 -04:00
Ravi Shankar
841a3abef6 Tidy: Prefer monkey patching sys.path over addsitedir (and some cleanup) 2017-03-20 12:23:05 +05:30
lucantrop
b1faaa15dc added tidy check for -> () 2017-03-13 17:38:32 +01:00
Jefry Lagrange
ebcb15d6f2 Rewrite the ban-type lint in Python
Delete old rust ban lint and move tests to python tidy

Fix ban lint regex and fix test
2017-02-25 15:56:06 +01:00
vwvww
ccb14abd12 Add 'use statements with extraneous spaces' tidy check
Add 'use statements with extraneous spaces' tidy check

I added simple check routine for 'use statements with extraneous
spaces' and codes that breaks the check routine in rust_tidy.rs.

* Added a code that using 'use statements with extraneous spaces' code
  in rust_tidy.rs
* Added assertion code in test_tidy.py.
* check_rust function in tidy.py now recognizes the simple case in
  the 'use statements with extraneous spaces'.
* Ran tidy check on rust code and modified a
  code(tests/unit/style/parsing/inherited_text.rs) that is not passing
  on this new tidy check.

TODO: this code has to be refactored to support more general cases.

- [X] ./mach test-tidy does not report any errors
- [X] These changes fix #14898 (github issue number if applicable).
2017-02-23 01:29:46 +09:00
Simon Sapin
31287d4d90 tidy: Ignore [replace]’d packages in the duplicate package lint. 2017-02-14 23:55:20 +01:00
Manish Goregaokar
b60368d5d9 Tidy checks for stylo 2017-02-08 21:56:55 -08:00
UK992
8a1aa354d6 Tidy: Report invalid listed ignored directories and files 2017-01-18 21:51:56 +01:00
Matthias Devlamynck
a7a2efea5c Moved tidy's BLOCKED_PACKAGES to the config file 2017-01-14 14:07:46 +01:00
Jure Podgoršek
adcedd8314 Rust tidy: disallow assignment = in the beginning of line 2017-01-06 20:56:59 +01:00
Alan Jeffrey
e3a8e3b706 Added test-tidy check for blocked packages. 2017-01-05 13:56:02 +00:00
UK992
63a4bf74b0 Fix tidy json alphabetical order check 2016-12-29 19:18:59 +01:00
UK992
b760578f0f Tidy: Check Cargo.lock for packages with same version and different sources 2016-12-26 16:49:08 +01:00
UK992
5bd53af960 Tidy: Simplify path normalization 2016-12-26 16:49:04 +01:00
Josh Matthews
14d8ae2478 Add a tidy check for problematic match cases in script_thread.rs 2016-12-16 11:52:45 -05:00
bors-servo
21ad1c2109 Auto merge of #14051 - birryree:tidy-check-buildbot-steps, r=aneeshusa
Adding linting checks for buildbot_steps.yml

This pull request adds some tidy checks around YAML files, and specifically `buildbot_steps.yml`.

Tidy checks added:

* YAML files are checked for well-formedness/parse-ability
* Whether a YAML file has duplicate keys
* Whether a `buildbot_steps.yml` file contains only mappings to list-of-strings.

---
<!-- 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 #13838 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR

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

…ing checking for correct mappings and duplicate YAML keys. Added unit tests to test_tidy.py.

<!-- 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/14051)
<!-- Reviewable:end -->
2016-12-08 17:39:44 -08:00
William Lee
aceb60ec1d Add tidy linting checks for buildbot_steps.yml
This commit adds tidy checks for buildbot_steps.yml, as well as unit
tests. These checks include:

* Checking buildbot_steps.yml can be parsed by a YAML loader
* buildbot_steps.yml does not contain duplicate keys
* buildbot_steps.yml keys map to a list of strings
2016-12-08 20:36:13 -05:00
Sijmen Schoon
42e675942c Implement tidy commit message test
Tests for work in progress commits.
2016-12-03 19:52:59 +01:00
Anthony Ramine
dfb35db6d3 Move to Cargo workspaces 2016-11-28 09:44:20 +01:00
Manish Goregaokar
177d6fa4ee Support basic immutable CSSOM 2016-11-15 06:56:18 -08:00
Ravi Shankar
8385c9ae79 Isolate the WPT lint and make use of the LintRunner 2016-11-11 19:54:32 +05:30
Ravi Shankar
b5cff9db8f Add a generic LintRunner object for running custom lints 2016-11-11 19:54:21 +05:30
Ravi Shankar
f214765b61 Move file list iterator to a new module 2016-11-10 18:56:51 +05:30
Yuki Izumi
d47aca18c4
Check for JSON key non-duplication and order 2016-11-07 19:02:22 +11:00
bors-servo
291f393723 Auto merge of #13986 - iamrohit7:tidy-feature-attrs, r=Wafflespeanut
Make test-tidy check for alphabetical ordering of #![feature(...)] statements

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

<!-- 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 #13954  (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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13986)

<!-- Reviewable:end -->
2016-11-01 01:13:35 -05:00
Rohit Burra
877d7166db Alphabetical order for #![feature(...)] in lib.rs 2016-11-01 11:35:32 +05:30
bors-servo
ccefef5be4 Auto merge of #13988 - dsprenkels:tidy-fncalls, r=Wafflespeanut
test-tidy: Check for space between function name and `(`

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

Disallow an extraneous space in a function call between
the function name and the opening parenthesis in Rust
code, while ignoring macro declarations.

---

<!-- 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 --all` does not report any errors
- [x] `./mach test-tidy --self` does not report any errors
- [x] These changes fix #13980

<!-- Either: -->
- [x] There are tests for these changes, these are written in
 - `python/tidy/servo_tidy_tests/rust_tidy.rs`
 - `python/tidy/servo_tidy_tests/test_tidy.py`
- [ ] These changes do not require tests

<!-- 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13988)

<!-- Reviewable:end -->
2016-10-31 13:03:32 -05:00
Daan Sprenkels
179e11ad8d test-tidy: Check for space between function name and (
Disallow an extraneous space in a function call between
the function name and the opening parenthesis in Rust
code, while ignoring macro declarations.

This commit fixes #13980.
2016-10-31 18:11:35 +01:00
Ms2ger
2ff0f33b2b Reinstate the wpt lint checking. 2016-10-31 15:00:59 +01:00
Mátyás Mustoha
5bb550dbf0 Update to use the new Android library build rules. 2016-10-28 22:17:10 +02:00
Shing Lyu
303ba20648 Don't check untracked file in tidy 2016-10-28 11:41:05 +08:00
Alexandrov Sergey
a1fd802d65 add SVG2 draft link to WEBIDL_STANDARDS test-tidy list 2016-10-07 21:41:21 +03:00
bors-servo
3a5fd8b49a Auto merge of #13447 - gterzian:check_webidls_folder_files, r=Wafflespeanut
Have tidy ensure that the there are no extra files in the webidls folder #13427

<!-- Please describe your changes on the following line: -->
 Have tidy ensure that the there are no extra files in the webidls folder #13427

---
<!-- 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 #13427 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes

<!-- 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13447)
<!-- Reviewable:end -->
2016-10-02 12:00:36 -05:00
Gregory
1f99381720 tidy: checking directories for unexpected file extensions
update config, check_dir func to use config

pass only_changed_files and exclude_dirs as args

simplify config

better conditional

remove unused default, amend error message

undo doc change
2016-10-02 14:40:28 +08:00
Matt Schmoyer
616eb83bba Avoid unecessary loop evaluation on empty lines for tidy check_license 2016-10-01 11:36:58 -04:00
Vignesh Sarma K (വിഘ്നേഷ് ശ൪മ കെ)
3bf5813096 Replace instances of old ServiceWorker specification URL with new one
The old specification URL is
https://slightlyoff.github.io/ServiceWorker/spec/service_worker/ has
been replaced by the new one at https://w3c.github.io/ServiceWorker/.
2016-09-25 20:32:32 +05:30
Hugo Thiessard
0ac212afb1 Issue #13350 Report tidy error for space after ( 2016-09-23 14:01:58 +02:00
UK992
875981ece5 Fix ordering use statements with braces 2016-09-09 04:42:30 +02:00
UK992
d5b76c9f6d Tidy: Handle empty files 2016-08-29 18:33:03 +02:00
UK992
0f07517049 Check for license only in Cargo.toml 2016-08-25 06:50:23 +02:00
Ravi Shankar
33d7b3967e Some cleanups in tidy 2016-08-23 00:53:09 +05:30
UK992
74dba5cbdd Check for errors in tidy config file 2016-08-20 22:51:46 +02:00
UK992
0ad905ae42 Tidy config file 2016-08-20 22:50:56 +02:00
Vladimir Vukicevic
e7dd579ebf Ignore TOML failing to parse Cargo.lock, due to a bug 2016-08-17 09:51:38 -04:00
Vladimir Vukicevic
0aa5ad4197 Don't enforce line length in Cargo.toml files 2016-08-17 09:51:02 -04:00
bors-servo
8419f96dc0 Auto merge of #12781 - UK992:tidycheck-rebased, r=Wafflespeanut
Improve tidy's license validation logic

Rebased and fixed https://github.com/servo/servo/pull/10721, which is inactive for months.
Fixes https://github.com/servo/servo/issues/10716

r? @larsbergstrom or @edunham

<!-- 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/12781)
<!-- Reviewable:end -->
2016-08-14 09:17:34 -05:00
UK992
fed0e94ec6 Add support colored text in Windows Console 2016-08-13 03:20:47 +02:00
UK992
9a3b61abe1 Check for blank line after shebang and grab actual comment block instead of hard-coded one 2016-08-12 13:34:38 +02:00
edunham
48ace17b54 Improve tidy's license validation logic
fixes https://github.com/servo/servo/issues/10716

I took the lazy way out and hardcoded the size of block we examine for
licenses.

fixes https://github.com/servo/servo/issues/10719

Includes tests for new functionality.
2016-08-12 13:32:09 +02:00
Ms2ger
e99cb474f0 Update ordered-float. 2016-08-11 09:13:22 +02:00