aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy
Commit message (Collapse)AuthorAgeFilesLines
* Add QueuingStrategy and UnderlyingSource (#32572)Ngo Iok Ui (Wu Yu Wei)2024-06-241-0/+1
| | | | | --------- Co-authored-by: Jason Tsai <jason@pews.dev>
* mach: fix test-tidy to handle missing merge commit (#32551)Mukilan Thiyagarajan2024-06-191-0/+2
| | | | | | | | | This restores the behaviour prior to #32540 where the case where no merge commit being found (which happens on CI in forks because we do a shallow clone) is handled as if no changes where found. Fixes #32550. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Use workspace definitions for all crates and update to the 2021 edition (#32544)Martin Robinson2024-06-181-0/+2
|
* mach: fix test-tidy to not skip `Cargo.lock` (#32540)Mukilan Thiyagarajan2024-06-181-9/+14
| | | | | | | | | | PR #32465 broke the lint because it initializes FileList with a file name (./Cargo.lock). This causes it to always return an empty list when the `only_changed_files` parameter is `False` since `os.walk` requires a directory and not a file. Fixes #32530. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Add cargo-deny to mach-tidy to check license compliance. (#32465)Jonathan Schwender2024-06-123-41/+57
| | | | | | | | | | | | | | | | | | | | | | | * Use cargo-deny to check license compliance. All licenses should be MPL-2.0 or weaker. * Run cargo-deny check licenses in mach tidy * fmt * Fix inverted boolean * Move cargo deny to tidy.py * Add quotes around license in error message * Integrate `cargo-deny` into tidy fully * Fix script tests --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* tidy: Make sure to run WPT lints when `--all` is passed to tidy (#31874)Martin Robinson2024-03-261-1/+1
| | | This also fixes the checked in WPT manifest.
* tidy: Fix WHATWG replacement links (#31449)Smitty2024-02-292-4/+4
|
* Fix bugs in `mach test-tidy` (#31232)Mukilan Thiyagarajan2024-01-311-1/+1
| | | | | | | | | | | | | | | | | * mach: test-tidy should return 1 for failure Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * fix lint issues Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * mach: tidy should allow spec links with trailing text Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* tidy: A few small improvements and fixes (#30941)Martin Robinson2024-01-022-160/+117
| | | | | | | | | | 1. Make the tidy output easier to follow 2. Integrate the WPT manifest cleanliness step into tidy itself and don't run it if nothing has changed in the WPT directory. 3. Fix an issue where Python test requirements were not installed, which could cause issues with some modules not being found. Fixes #30002.
* Improve formatting of Python files (#30919)Taym Haddadi2023-12-241-15/+15
| | | Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Replace script_plugins with a clippy like rustc driver (named crown) (#30508)Samson2023-12-012-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove script_plugins * Use crown instead of script_plugins * crown_is_not_used * Use crown in command base * bootstrap crown * tidy happy * disable sccache * Bring crown in tree * Install crown from tree * fix windows ci * fix warning * fix mac libscript_plugins.dylib is not available anymore * Update components/script/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> * Update for nightly-2023-03-18 Mostly just based off https://github.com/servo/servo/pull/30630 * Always install crown it's slow only when there is new version * Run crown test with `mach test-unit` * Small fixups; better trace_in_no_trace tests * Better doc * crown in config.toml * Fix tidy for real * no sccache on rustc_wrapper * document rustc overrides * fixup of compiletest * Make a few minor comment adjustments * Fix a typo in python/servo/platform/base.py Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com> * Proper test types * Ignore tidy on crown/tests --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* No extern crate test/tidy & better RUSTFLAGS handling in mach (#30328)Samson2023-09-102-18/+0
| | | | | | | | | | | * Remove unused extern crate rustflag * Remove tidy check alphabetical order of extern crates rustfmt's reorder_imports already does that * fix * better RUSTFLAGS handling
* Rename ports/winit package to servoshell (#30163)Atbrakhi2023-08-281-3/+3
| | | | | * rename winit package to servoshell * revert previous changes and rename only package
* Format toml files (#30112)Samson2023-08-172-3/+3
| | | | | | | * Add taplo fmt config for toml fmt * fmt toml files * Add even-better-toml to extensions recommendations
* Remove the YAML tidy code (#30004)Martin Robinson2023-07-185-99/+4
| | | | | | | | | This code was used to test buildbox_steps.yml, but Servo no longer uses buildbot, so this code is essentially unused. In addition, YAML + Cython 3 is causing issues on the CI. Fixes #30003 Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Enable the GitHub merge queue (#29989)Martin Robinson2023-07-131-1/+1
| | | Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Auto merge of #29923 - mrobinson:test-scripts, r=jdmbors-servo2023-06-302-8/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Combine all script tests into `test-scripts` Remove: - tidy self test support from `./mach test` - `./mach test-idl` Adds a `./mach test-scripts` command that is responsible for running all Python script tests. Run this during the CI to catch regressions in changes to scripts. The WebIDL tests are still *very* slow and there are from Gecko, so only run them when "-a" is passed meaning all tests. <!-- 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] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * Combine all script tests into `test-scripts`Martin Robinson2023-06-292-8/+11
| | | | | | | | | | | | | | | | | | | | | | Remove: - tidy self test support from `./mach test` - `./mach test-idl` Adds a `./mach test-scripts` command that is responsible for running all Python script tests. Run this during the CI to catch regressions in changes to scripts. The WebIDL tests are still *very* slow and there are from Gecko, so only run them when "-a" is passed meaning all tests.
* | Update scripts to reflect new WPT directory nameMartin Robinson2023-06-261-4/+4
| |
* | Standalone Flake8 configsagudev2023-06-231-7/+1
|/
* Convert tidy to a non-egg Python packageMartin Robinson2023-06-1549-213/+60
| | | | | | | | | | | 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.
* Remove more Python 2 compatibility codeMartin Robinson2023-05-291-5/+3
| | | | | | - os.environ is always `str` in Python 3. - The only string type is `str` so we can stop using `six.str_types`. - `iteritems()` isn't necessary because dicts have the `items()` method.
* Remove a print statement mistakenly added in a previous changeMartin Robinson2023-03-281-1/+0
| | | | | This statement is totally unnecessary and interferes with the console commands which erase and rewrite the current tidy status.
* Merge forbidden panic check into test-tidyMartin Robinson2023-03-225-2/+26
| | | | | | | | | 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.
* Update allowed license string.Josh Matthews2022-10-161-0/+1
|
* Use `#!/usr/bin/env bash` in shell scripts for NixOS compatibilityyvt2021-06-141-1/+1
| | | | Signed-off-by: yvt <i@yvt.jp>
* build(deps): bump pyyaml from 5.1 to 5.4 in /python/tidydependabot[bot]2021-03-251-1/+1
| | | | | | | | Bumps [pyyaml](https://github.com/yaml/pyyaml) from 5.1 to 5.4. - [Release notes](https://github.com/yaml/pyyaml/releases) - [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES) - [Commits](https://github.com/yaml/pyyaml/compare/5.1...5.4) Signed-off-by: dependabot[bot] <support@github.com>
* Auto merge of #27402 - kunalmohan:webgpu-cts, r=jdmbors-servo2020-08-041-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a copy of WebGPU CTS to wpt. <!-- Please describe your changes on the following line: --> The test suite is generated from `glsl-dependent` branch in https://github.com/gpuweb/cts We already have 6/44 tests passing and a number of subtests in other tests also pass. r?@jdm cc @kvark --- <!-- 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 #27395 (GitHub issue number if applicable) <!-- Either: --> - [X] These changes do not require tests because we don't have tests for tests. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * changes made for cts to workKunal Mohan2020-07-311-1/+1
| |
* | Fix tidy check when no duplicate versions present.Josh Matthews2020-07-311-1/+2
|/
* Handle apostrophes for whatwg URL tidy checkCYBAI2020-07-231-2/+2
|
* Implement Console grouping APIs.Josh Matthews2020-07-061-0/+1
|
* Auto merge of #27007 - saschanaz:py3-flake, r=jdmbors-servo2020-06-212-27/+30
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upgrade flake8/pyflakes for Py3 compatibility <!-- 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: --> - [ ] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * Use except Exception where Py2/3 disagreesKagami Sascha Rosylight2020-06-211-2/+2
| |
| * Fix new flake8 warningsKagami Sascha Rosylight2020-06-201-24/+27
| |
| * Upgrade flake8/pyflakes for Py3 compatibilityKagami Sascha Rosylight2020-06-201-3/+3
| |
* | Auto merge of #27005 - saschanaz:py3-tidy, r=jdmbors-servo2020-06-211-27/+20
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not raise StopIteration: PEP 479 <!-- Please describe your changes on the following line: --> This fixes `test-tidy` Py3 compatibility, as [PEP 479](https://www.python.org/dev/peps/pep-0479/) says `return` must be used to stop iteration inside generator instead of `raise StopIteration`. This introduces subtle behavior change where `FileList()` constructor now won't implicitly stop the caller generator when the list is empty. `wpt_lint.py` is modified to explicitly stop when empty, to match the change. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * | Return early when no merge base commitKagami Sascha Rosylight2020-06-211-6/+4
| | |
| * | Do not raise StopIteration: PEP 479Kagami Sascha Rosylight2020-06-201-22/+17
| |/
* / Initialize colorama only onceKagami Sascha Rosylight2020-06-201-2/+1
|/
* Fix output of test-tidy with duplicated packages.Josh Matthews2020-05-203-10/+16
|
* Add XRHand interfaceManish Goregaokar2020-04-271-0/+1
|
* Remove the lint added in https://github.com/servo/servo/pull/14589Simon Sapin2020-04-083-27/+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.
* Remove azure canvas backendDaniel Alley2020-02-252-5/+4
| | | | closes #25833
* Add lint check for `&DomRoot<T>`lberrymage2019-12-213-1/+3
| | | | | `&DomRoot<T> is strictly less expressive than `&T`, so using it is pointless.
* Make `mach test-tidy --self-test` compatible with Python3marmeladema2019-12-142-77/+77
|
* Make `mach test-tidy --no-wpt` compatible with Python3marmeladema2019-12-111-64/+64
| | | | | Note: tidiness tests of Python file using flake8 was effectively broken since a previous commit for Python3 compatibility
* Replace usage of basestring by six.string_types for Python3 compatibilitymarmeladema2019-12-101-1/+2
|
* Allow to specify glob pattern for ignored directories in servo-tidy.tomlmarmeladema2019-12-091-2/+4
|
* Auto merge of #24708 - szeged:webgpu-base, r=gterzian,kvarkbors-servo2019-11-251-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initial implementation of WebGPU API <!-- Please describe your changes on the following line: --> - Added the WebIDL bindings for GPU and GPUadapter interfaces. - Created a background thread for WebGPU api calls. - Established the async communication between the background thread and the WebGPU interfaces. - Implemented the `requesAdapter` function of `navigator.gpu` `./mach test-tidy` reports an error due to the different `arrayvec` version used in `servo` and `webgpu`, so added it to the ignore list in `servo-tidy.toml` --- <!-- 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 - [ ] `./mach test-tidy` does not report any errors - [ ] These changes addresses a part of #https://github.com/servo/servo/issues/24706 <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> cc @jdm, cc @kvark <!-- 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/24708) <!-- Reviewable:end -->