diff options
author | Martin Liska <mliska@suse.cz> | 2020-12-04 09:36:32 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2020-12-04 09:38:04 +0100 |
commit | 9199da4b59c34cbcf2cea912b39400d7e90525d6 (patch) | |
tree | 7c0bdd1c27fe022b9ac1fa783742455962051240 /contrib | |
parent | 9715663f7db7ac57121c9a60dd0078787e274f66 (diff) | |
download | gcc-9199da4b59c34cbcf2cea912b39400d7e90525d6.zip gcc-9199da4b59c34cbcf2cea912b39400d7e90525d6.tar.gz gcc-9199da4b59c34cbcf2cea912b39400d7e90525d6.tar.bz2 |
Document missing params.
contrib/ChangeLog:
* check-params-in-docs.py: use flake8 and add some
tweaks to ignore aarch64 params.
gcc/ChangeLog:
* doc/invoke.texi: Add missing params.
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/check-params-in-docs.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/contrib/check-params-in-docs.py b/contrib/check-params-in-docs.py index dfbfa3d..440549f 100755 --- a/contrib/check-params-in-docs.py +++ b/contrib/check-params-in-docs.py @@ -23,6 +23,7 @@ # import argparse +import sys from itertools import dropwhile, takewhile @@ -42,7 +43,7 @@ parser.add_argument('params_output') args = parser.parse_args() -ignored = set(['logical-op-non-short-circuit']) +ignored = {'logical-op-non-short-circuit'} params = {} for line in open(args.params_output).readlines(): @@ -58,15 +59,21 @@ texi = list(texi)[1:] token = '@item ' texi = [x[len(token):] for x in texi if x.startswith(token)] +# skip digits +texi = [x for x in texi if not x[0].isdigit()] +# skip aarch64 params +texi = [x for x in texi if not x.startswith('aarch64')] sorted_texi = sorted(texi) texi_set = set(texi) - ignored params_set = set(params.keys()) - ignored +success = True extra = texi_set - params_set if len(extra): print('Extra:') print(extra) + success = False missing = params_set - texi_set if len(missing): @@ -75,6 +82,9 @@ if len(missing): print('@item ' + m) print(params[m]) print() + success = False if texi != sorted_texi: print('WARNING: not sorted alphabetically!') + +sys.exit(0 if success else 1) |