diff options
author | UK992 <urbankrajnc92@gmail.com> | 2016-08-25 01:29:46 +0200 |
---|---|---|
committer | UK992 <urbankrajnc92@gmail.com> | 2016-08-25 06:50:23 +0200 |
commit | 0f075170497fc5ec4a396062d5fe46807d235d22 (patch) | |
tree | 139f5b907cdb4dd3a48a1aa39036e1090966bd0c /python | |
parent | 6f22251e6599aa529ce024d8618595be765c9a18 (diff) | |
download | servo-0f075170497fc5ec4a396062d5fe46807d235d22.tar.gz servo-0f075170497fc5ec4a396062d5fe46807d235d22.zip |
Check for license only in Cargo.toml
Diffstat (limited to 'python')
-rw-r--r-- | python/tidy/servo_tidy/tidy.py | 7 | ||||
-rw-r--r-- | python/tidy/servo_tidy_tests/Cargo.toml (renamed from python/tidy/servo_tidy_tests/test.toml) | 0 | ||||
-rw-r--r-- | python/tidy/servo_tidy_tests/test_tidy.py | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py index a23c444c9db..de3f83b84bd 100644 --- a/python/tidy/servo_tidy/tidy.py +++ b/python/tidy/servo_tidy/tidy.py @@ -29,11 +29,10 @@ config = { "skip-check-licenses": False, "ignore": { "files": [ - CONFIG_FILE_PATH, # ignore config file - "./.", # ignore hidden files + "./.", # ignore hidden files ], "directories": [ - "./.", # ignore hidden directories + "./.", # ignore hidden directories ], "packages": [], } @@ -312,7 +311,7 @@ duplicate versions for package "{package}" def check_toml(file_name, lines): - if not file_name.endswith(".toml"): + if not file_name.endswith("Cargo.toml"): raise StopIteration ok_licensed = False for idx, line in enumerate(lines): diff --git a/python/tidy/servo_tidy_tests/test.toml b/python/tidy/servo_tidy_tests/Cargo.toml index c979a5cbd34..c979a5cbd34 100644 --- a/python/tidy/servo_tidy_tests/test.toml +++ b/python/tidy/servo_tidy_tests/Cargo.toml diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py index f65ffa55d37..746783d1759 100644 --- a/python/tidy/servo_tidy_tests/test_tidy.py +++ b/python/tidy/servo_tidy_tests/test_tidy.py @@ -117,7 +117,7 @@ class CheckTidiness(unittest.TestCase): self.assertNoMoreErrors(errors) def test_toml(self): - errors = tidy.collect_errors_for_files(iterFile('test.toml'), [tidy.check_toml], [], print_text=False) + errors = tidy.collect_errors_for_files(iterFile('Cargo.toml'), [tidy.check_toml], [], print_text=False) self.assertEqual('found asterisk instead of minimum version number', errors.next()[2]) self.assertEqual('.toml file should contain a valid license.', errors.next()[2]) self.assertNoMoreErrors(errors) |