aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2017-09-26 00:05:23 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2017-09-26 02:18:07 +0200
commitdafcd821f5b3e44a8585884ee4c4bbbdc46b1c70 (patch)
tree2857d57fb5a7cbc5ccea37159cfa3afac183b122 /python/tidy
parent532dee36c10b7dd5d33e560b55cf65c7243ef1d3 (diff)
downloadservo-dafcd821f5b3e44a8585884ee4c4bbbdc46b1c70.tar.gz
servo-dafcd821f5b3e44a8585884ee4c4bbbdc46b1c70.zip
Fix some messages in the tidy script
It's MutJS<T>, not MutJS<JS<T>>.
Diffstat (limited to 'python/tidy')
-rw-r--r--python/tidy/servo_tidy/tidy.py6
-rw-r--r--python/tidy/servo_tidy_tests/ban-domrefcell.rs2
-rw-r--r--python/tidy/servo_tidy_tests/test_tidy.py2
3 files changed, 5 insertions, 5 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py
index e88f4dc1458..74c9bf7b36f 100644
--- a/python/tidy/servo_tidy/tidy.py
+++ b/python/tidy/servo_tidy/tidy.py
@@ -576,9 +576,9 @@ def check_rust(file_name, lines):
# There should be any use of banned types:
# Cell<JSVal>, Cell<JS<T>>, DOMRefCell<JS<T>>, DOMRefCell<HEAP<T>>
(r"(\s|:)+Cell<JSVal>", "Banned type Cell<JSVal> detected. Use MutJS<JSVal> instead", no_filter),
- (r"(\s|:)+Cell<JS<.+>>", "Banned type Cell<JS<T>> detected. Use MutJS<JS<T>> instead", no_filter),
- (r"DOMRefCell<JS<.+>>", "Banned type DOMRefCell<JS<T>> detected. Use MutJS<JS<T>> instead", no_filter),
- (r"DOMRefCell<Heap<.+>>", "Banned type DOMRefCell<Heap<T>> detected. Use MutJS<JS<T>> instead", no_filter),
+ (r"(\s|:)+Cell<JS<.+>>", "Banned type Cell<JS<T>> detected. Use MutJS<T> instead", no_filter),
+ (r"DOMRefCell<JS<.+>>", "Banned type DOMRefCell<JS<T>> detected. Use MutJS<T> instead", no_filter),
+ (r"DOMRefCell<Heap<.+>>", "Banned type DOMRefCell<Heap<T>> detected. Use MutJS<T> instead", no_filter),
# No benefit to using &Root<T>
(r": &Root<", "use &T instead of &Root<T>", no_filter),
(r"^&&", "operators should go at the end of the first line", no_filter),
diff --git a/python/tidy/servo_tidy_tests/ban-domrefcell.rs b/python/tidy/servo_tidy_tests/ban-domrefcell.rs
index a5953590d69..9cd8a74ca8c 100644
--- a/python/tidy/servo_tidy_tests/ban-domrefcell.rs
+++ b/python/tidy/servo_tidy_tests/ban-domrefcell.rs
@@ -13,7 +13,7 @@ use script::test::Node;
struct Foo {
bar: DOMRefCell<JS<Node>>
- //~^ ERROR Banned type DOMRefCell<JS<T>> detected. Use MutJS<JS<T>> instead
+ //~^ ERROR Banned type DOMRefCell<JS<T>> detected. Use MutJS<T> instead
}
fn main() {}
diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py
index 4631d20ded7..6a45fd42062 100644
--- a/python/tidy/servo_tidy_tests/test_tidy.py
+++ b/python/tidy/servo_tidy_tests/test_tidy.py
@@ -151,7 +151,7 @@ class CheckTidiness(unittest.TestCase):
self.assertNoMoreErrors(ban_errors)
ban_errors = tidy.collect_errors_for_files(iterFile('ban-domrefcell.rs'), [], [tidy.check_rust], print_text=False)
- self.assertEqual('Banned type DOMRefCell<JS<T>> detected. Use MutJS<JS<T>> instead', ban_errors.next()[2])
+ self.assertEqual('Banned type DOMRefCell<JS<T>> detected. Use MutJS<T> instead', ban_errors.next()[2])
self.assertNoMoreErrors(ban_errors)
def test_spec_link(self):