servo: Merge #13027 - Check for license only in Cargo.toml (from UK992:tidy-toml); r=Wafflespeanut

This fix problem with false reporting about missing license in every toml file, that is not Cargo.toml

r? @Wafflespeanut

<!-- 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

Source-Repo: https://github.com/servo/servo
Source-Revision: 8a5e1b70b7decb251e691ace114e033419a53764
This commit is contained in:
UK992
2016-08-25 10:58:09 -05:00
parent c8b6f36403
commit 3cdd47dd6d
3 changed files with 4 additions and 5 deletions

View File

@@ -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):