Commit graph

137 commits

Author SHA1 Message Date
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
Simon Martin
1e60c915f9 Issue #12421: tidy should also check .html files 2016-08-09 22:04:57 +02:00
Ravi Shankar
a04028eede Prefer length and percentage for word spacing 2016-08-09 17:53:40 +05:30
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
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
bors-servo
de4eaa4f21 Auto merge of #12511 - asajeffrey:test-tidy-dep-licenses, r=larsbergstrom
Added test-tidy for dependent licenses.

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

Add a test-tidy lint for dependency licenses. Note that #12507 should land first.

---
<!-- 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 do not require tests because we don't test our lints

<!-- 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/12511)
<!-- Reviewable:end -->
2016-07-21 12:23:24 -05:00
Alan Jeffrey
536314be79 Added test-tidy for dependent licenses. 2016-07-21 11:29:04 -05:00
Jeena Lee
530b02790b Add the append method for the Headers API for the Fetch API
This commit will add the append method and associated helper functions, and introduce any necessary changes for it.
2016-07-19 13:40:31 -07:00
Alan Jeffrey
9fa54af347 Allow MIT/Apache-2.0 license as well as MPL-2.0. 2016-07-14 11:24:29 -05:00
Alan Jeffrey
62e95c5a61 All our Cargo.toml files should contain an MPL-2.0 license field. 2016-07-14 10:26:34 -05:00
Owen Coutts
ff4cb7f80a [tidy] check for duplicate keys in .json files 2016-07-08 11:12:12 +02:00