Merge "2.13: Cleanup duplicate paragraph"
[lttng-docs.git] / tools / check.py
index 187cd1c3c95abdf4f13110c450d577e532354c98..0fe2719fc0c0a9bbe1ba00710ebca408ccffc901 100644 (file)
@@ -107,13 +107,18 @@ class _Checker:
         sections_anchors = self._root.findall('.//section')
         sections_anchors += self._root.findall('.//anchor')
         sections_anchors += self._root.findall('.//glossary')
+        sections_anchors += self._root.findall('.//important')
+        sections_anchors += self._root.findall('.//tip')
+        sections_anchors += self._root.findall('.//caution')
+        sections_anchors += self._root.findall('.//warning')
+        sections_anchors += self._root.findall('.//note')
         links = self._root.findall('.//link')
         end_ids = set()
 
         for sa in sections_anchors:
             end_id = sa.get('id')
 
-            if end_id is None:
+            if sa.tag in ('section', 'anchor') and end_id is None:
                 self._perror('Found a section/anchor with no ID', True)
 
             end_ids.add(end_id)
@@ -164,7 +169,7 @@ def _main():
     if checker.has_error:
         return 1
 
-    print(colored('All good!', 'green', attrs=['bold']))
+    print(colored('{}: All good!'.format(args.infile), 'green', attrs=['bold']))
 
     return 0
 
This page took 0.022878 seconds and 4 git commands to generate.