Hi Sandra.

Here is a patch for contrib/check-params-in-docs.py to go with your --param
patch series.  Feel free to commit the patch if/when you commit your series or
let me know and I'll commit it.

Btw, applying the first patch of your series produces this:
/home/fkastl/foo/1.patch:4210: new blank line at EOF.
+
warning: 1 line adds whitespace errors.

For what it's worth, putting params into the internals manual seems like a good
step to me :).

Cheers,
Filip Kastl


-- 8< --


Update the check-params-in-docs.py script so that it works with params
newly being documented in params.texi instead of in invoke.texi.

contrib/ChangeLog:

        * check-params-in-docs.py: Extend architecture-specific options
        filtering.  Remove the mechanism for seeking to the param
        section.

Signed-off-by: Filip Kastl <[email protected]>
---
 contrib/check-params-in-docs.py | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/contrib/check-params-in-docs.py b/contrib/check-params-in-docs.py
index 4f6bf24e7f5..668a763188a 100755
--- a/contrib/check-params-in-docs.py
+++ b/contrib/check-params-in-docs.py
@@ -26,7 +26,6 @@
 
 import argparse
 import sys
-from itertools import dropwhile, takewhile
 
 
 def get_param_tuple(line):
@@ -39,7 +38,8 @@ def get_param_tuple(line):
     return (name, description)
 
 def target_specific(param):
-    return param.split('-')[0] in ('aarch64', 'gcn', 'x86')
+    return param.split('-')[0] in ('aarch64', 'gcn', 'x86', 'riscv', 'rs6000',
+                                   'loongarch')
 
 
 parser = argparse.ArgumentParser()
@@ -59,11 +59,7 @@ for line in open(args.params_output).readlines():
 # Skip target-specific params
 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()])
-texi = dropwhile(lambda x: 'itemx --param' not in x, texi)
-texi = takewhile(lambda x: '@node Instrumentation Options' not in x, texi)
-texi = list(texi)[1:]
+texi = list([x.strip() for x in open(args.texi_file).readlines()])
 
 texi_params = []
 skip = False
-- 
2.51.0

Reply via email to