aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy/servo_tidy_tests/test_tidy.py
Commit message (Collapse)AuthorAgeFilesLines
* Convert tidy to a non-egg Python packageMartin Robinson2023-06-151-289/+0
| | | | | | | | | | | It seems that servo-tidy is only used by webrender in my GitHub searches. WebRender could simply use `rustfmt` and the tidy on pypi hasn't been updated since 2018. Converting tidy to a normal Python package removes the maintenance burden of continually fixing the easy install configuration. Fixes #29094. Fixes #29334.
* Merge forbidden panic check into test-tidyMartin Robinson2023-03-221-0/+2
| | | | | | | | | This cleans up the GitHub actions yaml a bit and ensures that developers are running this check locally before submitting changes. In addition, it allows adding tests for this check. Finally, this change fixes the tidy tests by upgrading voluptuous for Python 3.10 as well as by reverting an inadvertent change for NixOS compatibility on one of the dummy testing files.
* Fix output of test-tidy with duplicated packages.Josh Matthews2020-05-201-4/+5
|
* Remove the lint added in https://github.com/servo/servo/pull/14589Simon Sapin2020-04-081-6/+0
| | | | | Per https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a8a5a716b3bdf52fa7960a1e4ee89add it looks like the drop order of temporaries was changed at some point and this pattern is no longer problematic.
* Add lint check for `&DomRoot<T>`lberrymage2019-12-211-0/+1
| | | | | `&DomRoot<T> is strictly less expressive than `&T`, so using it is pointless.
* Make `mach test-tidy --self-test` compatible with Python3marmeladema2019-12-141-69/+69
|
* report when blocked package exception is not neededSiddhartha Mishra2019-09-221-0/+19
|
* Remove regex-based checks in servo-tidy that are covered by rustfmtSimon Sapin2019-06-221-25/+0
|
* Fix test-tidy self testPyfisch2018-11-071-6/+0
| | | | | Install rustup on first Travis job. Only use rustfmt::skip as an outer attribute.
* Add test that actually tests the testTimur Borkhodoev2018-02-021-0/+1
|
* Add correct file test for manifest testTimur Borkhodoev2018-02-021-2/+5
|
* Add self-test and modify tidy to accomodate the testTimur Borkhodoev2018-02-011-0/+5
|
* Update buildbot_steps lint to handle env variablesAneesh Agrawal2018-01-081-2/+2
| | | | | | | | | | https://github.com/servo/saltfs/pull/687 added support for specifying environment variables in `buildbot_steps.yml`. Update the servo-tidy buildbot_steps.yml linter to reflect this. Use the voluptuous Python library (BSD 3-clause license) for validation in lieu of a much larger hand-written implementation. Update the tidy self tests to take into account the new error messages.
* Report an errror if a package has duplicates allowed but there are no duplicatesMaxim Novikov2017-11-211-0/+18
| | | | Resolves: #19306
* Rename DOMRefCell<T> to DomRefCell<T>Anthony Ramine2017-09-261-1/+1
| | | | | | | | I don't want to do such a gratuitous rename, but with all the other types now having "Dom" as part of their name, and especially with "DomOnceCell", I feel like the other cell type that we already have should also follow the convention. That argument loses weight though when we realise there is still DOMString and other things.
* Rename MutJS<T> to MutDom<T>Anthony Ramine2017-09-261-2/+2
|
* Rename JS<T> to Dom<T>Anthony Ramine2017-09-261-1/+1
|
* Fix some messages in the tidy scriptAnthony Ramine2017-09-261-1/+1
| | | | It's MutJS<T>, not MutJS<JS<T>>.
* Make tidy aware of Rust multiline stringsMichael Droettboom2017-09-211-0/+5
| | | | | | As a result of tighter and more correct handling of character literals, this now catches a few kinds of syntax involving lifetimes that were previously missed, so those have been updated.
* Automatically verify that derive() lists are alphabetically orderedClément DAVID2017-08-231-0/+1
|
* tidy: add extra space after keyword checkPavel Sergeev2017-07-201-0/+2
|
* Count number of braces on a line in .Alan Jeffrey2017-06-071-0/+1
|
* Make tidy check that opening and closing braces that begin a line do so with ↵coalman2017-04-181-0/+2
| | | | proper alignment.
* added tidy check for -> ()lucantrop2017-03-131-0/+1
|
* Rewrite the ban-type lint in PythonJefry Lagrange2017-02-251-0/+8
| | | | | | Delete old rust ban lint and move tests to python tidy Fix ban lint regex and fix test
* Add 'use statements with extraneous spaces' tidy checkvwvww2017-02-231-0/+2
| | | | | | | | | | | | | | | | | | | | | 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).
* Tidy: Report invalid listed ignored directories and filesUK9922017-01-181-0/+2
|
* Rust tidy: disallow assignment = in the beginning of lineJure Podgoršek2017-01-061-0/+1
|
* Tidy: Check Cargo.lock for packages with same version and different sourcesUK9922016-12-261-6/+10
|
* Add a tidy check for problematic match cases in script_thread.rsJosh Matthews2016-12-161-0/+6
|
* Auto merge of #14051 - birryree:tidy-check-buildbot-steps, r=aneeshusabors-servo2016-12-081-0/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 -->
| * Add tidy linting checks for buildbot_steps.ymlWilliam Lee2016-12-081-0/+15
| | | | | | | | | | | | | | | | | | 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
* | Add tests for the new LintRunnerRavi Shankar2016-11-111-0/+23
| |
* | Move file list iterator to a new moduleRavi Shankar2016-11-101-4/+3
|/
* Check for JSON key non-duplication and orderYuki Izumi2016-11-071-0/+6
|
* Auto merge of #13986 - iamrohit7:tidy-feature-attrs, r=Wafflespeanutbors-servo2016-11-011-0/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 -->
| * Tests alphabetical ordering of #![feature(...)]Rohit Burra2016-11-011-0/+8
| |
* | test-tidy: Check for space between function name and `(`Daan Sprenkels2016-10-311-0/+1
|/ | | | | | | | 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.
* Auto merge of #13447 - gterzian:check_webidls_folder_files, r=Wafflespeanutbors-servo2016-10-021-0/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 -->
| * tidy: checking directories for unexpected file extensionsGregory2016-10-021-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | using word license in test name for consistencyMatt Schmoyer2016-10-011-1/+1
|/
* Issue #13350 Report tidy error for space after (Hugo Thiessard2016-09-231-0/+3
|
* Fix ordering `use` statements with bracesUK9922016-09-091-0/+1
|
* Tidy: Handle empty filesUK9922016-08-291-0/+5
|
* Check for license only in Cargo.tomlUK9922016-08-251-1/+1
|
* Some cleanups in tidyRavi Shankar2016-08-231-3/+3
|
* Check for errors in tidy config fileUK9922016-08-201-0/+7
|
* Check for blank line after shebang and grab actual comment block instead of ↵UK9922016-08-121-0/+5
| | | | hard-coded one
* Improve tidy's license validation logicedunham2016-08-121-0/+4
| | | | | | | | | | | 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.
* Add lint for `[` instead of `[[` in shells scriptsAneesh Agrawal2016-08-051-0/+2
|