diff options
author | Jonathan Schwender <55576758+jschwe@users.noreply.github.com> | 2024-06-12 11:54:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-12 09:54:45 +0000 |
commit | fd472ebd0edc8eb91155b20e95ea9acfa6e77573 (patch) | |
tree | 357745d9283222d698cc80bf8ec931ff336f6dc3 /python/tidy/test.py | |
parent | 370fbf0331d73ae95ea29e67305aa86065c3604b (diff) | |
download | servo-fd472ebd0edc8eb91155b20e95ea9acfa6e77573.tar.gz servo-fd472ebd0edc8eb91155b20e95ea9acfa6e77573.zip |
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>
Diffstat (limited to 'python/tidy/test.py')
-rw-r--r-- | python/tidy/test.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/tidy/test.py b/python/tidy/test.py index 92f9494013f..1d7ce3fbfc8 100644 --- a/python/tidy/test.py +++ b/python/tidy/test.py @@ -174,7 +174,7 @@ class CheckTidiness(unittest.TestCase): self.assertNoMoreErrors(errors) def test_lock(self): - errors = tidy.check_cargo_lock_file(test_file_path('duplicated_package.lock'), print_text=False) + errors = tidy.run_custom_cargo_lock_lints(test_file_path('duplicated_package.lock'), print_text=False) msg = """duplicate versions for package `test` \t\x1b[93mThe following packages depend on version 0.4.9 from 'crates.io':\x1b[0m \t\ttest2 0.1.0 @@ -191,7 +191,7 @@ class CheckTidiness(unittest.TestCase): def test_lock_ignore_without_duplicates(self): tidy.config["ignore"]["packages"] = ["test", "test2", "test3", "test5"] - errors = tidy.check_cargo_lock_file(test_file_path('duplicated_package.lock'), print_text=False) + errors = tidy.run_custom_cargo_lock_lints(test_file_path('duplicated_package.lock'), print_text=False) msg = ( "duplicates for `test2` are allowed, but only single version found" @@ -209,7 +209,7 @@ class CheckTidiness(unittest.TestCase): def test_lock_exceptions(self): tidy.config["blocked-packages"]["rand"] = ["test_exception", "test_unneeded_exception"] - errors = tidy.check_cargo_lock_file(test_file_path('blocked_package.lock'), print_text=False) + errors = tidy.run_custom_cargo_lock_lints(test_file_path('blocked_package.lock'), print_text=False) msg = ( "Package test_blocked 0.0.2 depends on blocked package rand." |