Commit graph

12 commits

Author SHA1 Message Date
zefr0x
c96de69e80
Use ruff to enforce python code formatting (#37117)
Requires servo/servo#37045 for deps and config.

Testing: No need for tests to test tests.
Fixes: servo/servo#37041

---------

Signed-off-by: zefr0x <zer0-x.7ty50@aleeas.com>
2025-05-26 11:54:43 +00:00
Martin Robinson
7256590599
Remove resources/prefs.json (#34999)
This file is not used any longer.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-01-16 07:38:58 +00:00
Martin Robinson
ee3190a7f5
tidy: Make the tidy tests pass tidy (#34663)
The issue here is mainly that some of the lines are longer than 120
characters. Just add linebreak where appropriate.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2024-12-17 10:56:18 +00:00
Martin Robinson
682eba9f74
tidy: Use more cargo-deny features (#34447)
Instead of parsing the `Cargo.lock` file directly in `tidy.py`. Use
`cargo-deny`, which we already use to detect unapproved licenses in the
dependency chain to detect duplicate and banned crates. In addition,
enable all other `cargo-deny` checks and add exceptions where necessary
for them. This depends on the latest release of `cargo-deny` which
depends on a recent verison of `rust`.

Fixes #34393.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2024-12-13 08:47:40 +00:00
Martin Robinson
e70507ca40
tidy: Fix rustdoc warnings and add a tidy check for a common URL issue (#33366)
This change fixes all rustdoc errors and also adds a tidy check for a
very common rustdoc URL issue. Eventually rustdoc warnings should likely
cause the build to fail, but this catches those issues sooner in order
to not waste so much developer time.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2024-09-08 15:04:19 +00:00
Jonathan Schwender
fd472ebd0e
Add cargo-deny to mach-tidy to check license compliance. (#32465)
* 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>
2024-06-12 09:54:45 +00:00
Smitty
ffc9730a48
tidy: Fix WHATWG replacement links (#31449) 2024-02-29 06:02:41 +00:00
Martin Robinson
516cc2cbca
tidy: A few small improvements and fixes (#30941)
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.
2024-01-02 06:14:51 +00:00
Samson
9b1247b20f
No extern crate test/tidy & better RUSTFLAGS handling in mach (#30328)
* Remove unused extern crate rustflag

* Remove tidy check alphabetical order of extern crates

rustfmt's reorder_imports already does that

* fix

* better RUSTFLAGS handling
2023-09-10 18:32:10 +00:00
Martin Robinson
b91e3654e4
Remove the YAML tidy code (#30004)
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>
2023-07-18 12:36:03 +00:00
Martin Robinson
ae9a9e1d17
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.
2023-06-29 19:09:33 +02:00
Martin Robinson
81433a8684
Convert tidy to a non-egg Python package
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.
2023-06-15 13:10:06 +02:00
Renamed from python/tidy/servo_tidy_tests/test_tidy.py (Browse further)