Skip to content

Commit

Permalink
Documentation improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Gilles Peskine <[email protected]>
  • Loading branch information
gilles-peskine-arm committed Dec 23, 2022
1 parent 38f514d commit 7528986
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions scripts/code_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,18 +159,20 @@ def main() -> int:
"""
uncrustify_version = get_uncrustify_version().strip()
if UNCRUSTIFY_SUPPORTED_VERSION not in uncrustify_version:
print("Warning: Using unsupported Uncrustify version '" \
+ uncrustify_version + "' (Note: The only supported version" \
"is " + UNCRUSTIFY_SUPPORTED_VERSION + ")", file=STDOUT_UTF8)
print("Warning: Using unsupported Uncrustify version '" +
uncrustify_version + "'", file=STDOUT_UTF8)
print("Note: The only supported version is " +
UNCRUSTIFY_SUPPORTED_VERSION, file=STDOUT_UTF8)

parser = argparse.ArgumentParser()
parser.add_argument('-f', '--fix', action='store_true',
help='modify source files to fix the code style')
help=('modify source files to fix the code style '
'(default: print diff, do not modify files)'))
# --files is almost useless: it only matters if there are no files
# ('code_style.py' without arguments checks all files known to Git,
# 'code_style.py --files' does nothing). 'code_style.py --files ...' is
# intended as a stable ("porcelain") way to restyle a possibly empty
# set of files.
# 'code_style.py --files' does nothing). In particular,
# 'code_style.py --files ...' is intended as a stable ("porcelain") way
# to restyle a possibly empty set of files.
parser.add_argument('--files', action='store_true',
help='only check the specified files (default with non-option arguments)')
parser.add_argument('operands', nargs='*', metavar='FILE',
Expand Down

0 comments on commit 7528986

Please sign in to comment.