diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-12-24 12:34:55 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-12-29 16:45:36 +0200 |
commit | b7704820f4cc8efa9e606f2d44ac2fb17a28498c (patch) | |
tree | 63a05e9cb29695e8220a29282ac1d3630b2c1fe9 /Documentation | |
parent | 8fffab46b80fd2712a48b9a29bfe711e8262bb90 (diff) |
utils: checkstyle.py: Drop astyle support
Formatting code using astyle doesn't lead to results as good as with
clang-format, and doesn't receive much test coverage as most developers
use clang-format. The code is thus bitrotting. Drop it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/coding-style.rst | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/Documentation/coding-style.rst b/Documentation/coding-style.rst index 71d5c0b2..30c1778e 100644 --- a/Documentation/coding-style.rst +++ b/Documentation/coding-style.rst @@ -283,28 +283,12 @@ The 'clang-format' code formatting tool can be used to reformat source files with the libcamera coding style, defined in the .clang-format file at the root of the source tree. -Alternatively the 'astyle' tool can also be used, with the following arguments. - -:: - - --style=linux - --indent=force-tab=8 - --attach-namespaces - --attach-extern-c - --pad-oper - --align-pointer=name - --align-reference=name - --max-code-length=120 - -Use of astyle is discouraged as clang-format better matches the libcamera coding -style. - -As both astyle and clang-format are code formatters, they operate on full files -and output reformatted source code. While they can be used to reformat code -before sending patches, it may generate unrelated changes. To avoid this, -libcamera provides a 'checkstyle.py' script wrapping the formatting tools to -only retain related changes. This should be used to validate modifications -before submitting them for review. +As clang-format is a code formatter, it operates on full files and outputs +reformatted source code. While it can be used to reformat code before sending +patches, it may generate unrelated changes. To avoid this, libcamera provides a +'checkstyle.py' script wrapping the formatting tools to only retain related +changes. This should be used to validate modifications before submitting them +for review. The script operates on one or multiple git commits specified on the command line. It does not modify the git tree, the index or the working directory and @@ -393,8 +377,4 @@ diff that fixes the issues, on top of the corresponding commit. As the script is in early development false positive are expected. The flagged issues should be reviewed, but the diff doesn't need to be applied blindly. -The checkstyle.py script uses clang-format by default if found, and otherwise -falls back to astyle. The formatter can be manually selected with the -'--formatter' argument. - Happy hacking, libcamera awaits your patches! |