aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorFilip Kastl <fkastl@suse.cz>2024-09-18 16:38:30 +0200
committerFilip Kastl <fkastl@suse.cz>2024-09-18 16:38:30 +0200
commit4b7e6d5faa137f18a36d8c6323a8640e61ee48f1 (patch)
tree1ae6dece40aacd322df6aef66125638237650df6 /contrib
parentde1389e24e8dc98b65bc8d40976172214ac4ecc0 (diff)
downloadgcc-4b7e6d5faa137f18a36d8c6323a8640e61ee48f1.zip
gcc-4b7e6d5faa137f18a36d8c6323a8640e61ee48f1.tar.gz
gcc-4b7e6d5faa137f18a36d8c6323a8640e61ee48f1.tar.bz2
contrib: Set check-params-in-docs.py to skip tables of values of a param
Currently check-params-in-docs.py reports extra params being listed in invoke.texi. However, those aren't actual params but items in a table of possible values of the aarch64-autove-preference param. This patch changes check-params-in-docs.py to ignore similar tables. contrib/ChangeLog: * check-params-in-docs.py: Skip tables of values of a param. Remove code that skips items beginning with a number. Signed-off-by: Filip Kastl <fkastl@suse.cz>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/check-params-in-docs.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/contrib/check-params-in-docs.py b/contrib/check-params-in-docs.py
index ccdb8d7..102f0e6 100755
--- a/contrib/check-params-in-docs.py
+++ b/contrib/check-params-in-docs.py
@@ -66,14 +66,23 @@ texi = takewhile(lambda x: '@node Instrumentation Options' not in x, texi)
texi = list(texi)[1:]
texi_params = []
+skip = False
for line in texi:
+ # Skip @table @samp sections of manual where values of a param are usually
+ # listed
+ if skip:
+ if line.startswith('@end table'):
+ skip = False
+ continue
+ elif line.startswith('@table @samp'):
+ skip = True
+ continue
+
for token in ('@item ', '@itemx '):
if line.startswith(token):
texi_params.append(line[len(token):])
break
-# Skip digits
-texi_params = [x for x in texi_params if not x[0].isdigit()]
# Skip target-specific params
texi_params = [x for x in texi_params if not target_specific(x)]