aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy/servo_tidy/tidy.py
diff options
context:
space:
mode:
authorAlan Jeffrey <ajeffrey@mozilla.com>2016-07-14 10:26:34 -0500
committerAlan Jeffrey <ajeffrey@mozilla.com>2016-07-14 10:26:34 -0500
commit62e95c5a6192df4ecc8fd17a25200bb2188795d5 (patch)
tree028686ca0b26185d5512673d796932084e04db4f /python/tidy/servo_tidy/tidy.py
parent86b2104f11ce1070818e07728160085914521aa0 (diff)
downloadservo-62e95c5a6192df4ecc8fd17a25200bb2188795d5.tar.gz
servo-62e95c5a6192df4ecc8fd17a25200bb2188795d5.zip
All our Cargo.toml files should contain an MPL-2.0 license field.
Diffstat (limited to 'python/tidy/servo_tidy/tidy.py')
-rw-r--r--python/tidy/servo_tidy/tidy.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py
index 093e8f3aeee..23140de9987 100644
--- a/python/tidy/servo_tidy/tidy.py
+++ b/python/tidy/servo_tidy/tidy.py
@@ -295,9 +295,13 @@ duplicate versions for package "{package}"
def check_toml(file_name, lines):
if not file_name.endswith(".toml"):
raise StopIteration
+ mpl_licensed = False
for idx, line in enumerate(lines):
if line.find("*") != -1:
yield (idx + 1, "found asterisk instead of minimum version number")
+ mpl_licensed |= ('license = "MPL-2.0"' in line)
+ if not mpl_licensed:
+ yield (0, ".toml file should contain MPL-2.0 license.")
def check_rust(file_name, lines):