aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2018-05-04 11:33:32 +0200
committerSimon Sapin <simon.sapin@exyr.org>2018-05-04 11:38:45 +0200
commit82714e08a1c21885484ea210d543a12acd8b7e07 (patch)
tree26331b48d6e633f9ea96a2dd978be1f9c7d7efa4 /python
parent3bcf64be7bd190f00522886f7fd557dcfc7c6d22 (diff)
downloadservo-82714e08a1c21885484ea210d543a12acd8b7e07.tar.gz
servo-82714e08a1c21885484ea210d543a12acd8b7e07.zip
Get a real parser, tidy
Diffstat (limited to 'python')
-rw-r--r--python/tidy/servo_tidy/tidy.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py
index 1dcdfd17849..9208727cbb3 100644
--- a/python/tidy/servo_tidy/tidy.py
+++ b/python/tidy/servo_tidy/tidy.py
@@ -398,7 +398,8 @@ def check_toml(file_name, lines):
for idx, line in enumerate(lines):
if idx == 0 and "[workspace]" in line:
raise StopIteration
- if line.find("*") != -1:
+ line_without_comment, _, _ = line.partition("#")
+ if line_without_comment.find("*") != -1:
yield (idx + 1, "found asterisk instead of minimum version number")
for license_line in licenses_toml:
ok_licensed |= (license_line in line)