aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilip Kastl <fkastl@suse.cz>2024-12-04 15:46:54 +0100
committerFilip Kastl <fkastl@suse.cz>2024-12-04 15:53:05 +0100
commit15f5972e16e9a8f6ef0a372fdbe5359df3d0af1a (patch)
tree93a45edfa9797d42005b4ee065d25b2cadf00536
parenta0ac8fa55a4749979faa56a9e8bd389252edc89f (diff)
downloadgcc-15f5972e16e9a8f6ef0a372fdbe5359df3d0af1a.zip
gcc-15f5972e16e9a8f6ef0a372fdbe5359df3d0af1a.tar.gz
gcc-15f5972e16e9a8f6ef0a372fdbe5359df3d0af1a.tar.bz2
contrib: Fix 2 bugs in check-params-in-docs.py
In my last patch for check-params-in-docs.py I accidentally 1. left one occurence of the 'help_params' variable not renamed 2. converted 'help_params' from a dict to a list These issues cause the script to error when encountering a parameter missing in docs. This patch should fix these issues. contrib/ChangeLog: * check-params-in-docs.py: 'params' -> 'help_params'. Don't convert 'help_params' to a list. Signed-off-by: Filip Kastl <fkastl@suse.cz>
-rwxr-xr-xcontrib/check-params-in-docs.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/check-params-in-docs.py b/contrib/check-params-in-docs.py
index 102f0e6..5d5c64c 100755
--- a/contrib/check-params-in-docs.py
+++ b/contrib/check-params-in-docs.py
@@ -57,7 +57,7 @@ for line in open(args.params_output).readlines():
help_params[r[0]] = r[1]
# Skip target-specific params
-help_params = [x for x in help_params.keys() if not target_specific(x)]
+help_params = {x:y for x,y in help_params.items() if not target_specific(x)}
# Find section in .texi manual with parameters
texi = ([x.strip() for x in open(args.texi_file).readlines()])
@@ -87,7 +87,7 @@ for line in texi:
texi_params = [x for x in texi_params if not target_specific(x)]
texi_set = set(texi_params) - ignored
-params_set = set(help_params) - ignored
+params_set = set(help_params.keys()) - ignored
success = True
extra = texi_set - params_set
@@ -101,7 +101,7 @@ if len(missing):
print('Missing:')
for m in missing:
print('@item ' + m)
- print(params[m])
+ print(help_params[m])
print()
success = False