diff --git a/.astylerc b/.astylerc index 5063b265f41..89a133ccdb1 100644 --- a/.astylerc +++ b/.astylerc @@ -53,4 +53,4 @@ --exclude=src/third-party # but don't be sad about no tests/src/third-party ---ignore-exclude-errors +--ignore-exclude-errors-x diff --git a/doc/CODE_STYLE.md b/doc/CODE_STYLE.md index 06a768cc247..ac2028ee5af 100644 --- a/doc/CODE_STYLE.md +++ b/doc/CODE_STYLE.md @@ -6,13 +6,13 @@ We are using astyle version 3.0.1. Version 3.1 should also work, though there ar Blocks of code can be passed through astyle to ensure that their formatting is correct: - astyle --style=1tbs --attach-inlines --indent=spaces=4 --align-pointer=name --max-code-length=100 --break-after-logical --indent-classes --indent-preprocessor --indent-switches --indent-col1-comments --min-conditional-indent=0 --pad-oper --unpad-paren --pad-paren-in --add-brackets --convert-tabs --exclude=src/third-partu --ignore-exclude-errors + astyle --style=1tbs --attach-inlines --indent=spaces=4 --align-pointer=name --max-code-length=100 --break-after-logical --indent-classes --indent-preprocessor --indent-switches --indent-col1-comments --min-conditional-indent=0 --pad-oper --unpad-paren --pad-paren-in --add-brackets --convert-tabs --exclude=src/third-party --ignore-exclude-errors-x These options are mirrored in `.astylerc`, `Cataclysm-DDA.sublime-project` and `doc/CODE_STYLE.txt` For example, from `vi`, set marks a and b around the block, then: - :'a,'b ! astyle --style=1tbs --attach-inlines --indent=spaces=4 --align-pointer=name --max-code-length=100 --break-after-logical --indent-classes --indent-preprocessor --indent-switches --indent-col1-comments --min-conditional-indent=0 --pad-oper --unpad-paren --pad-paren-in --add-brackets --convert-tabs --exclude=src/third-party --ignore-exclude-errors + :'a,'b ! astyle --style=1tbs --attach-inlines --indent=spaces=4 --align-pointer=name --max-code-length=100 --break-after-logical --indent-classes --indent-preprocessor --indent-switches --indent-col1-comments --min-conditional-indent=0 --pad-oper --unpad-paren --pad-paren-in --add-brackets --convert-tabs --exclude=src/third-party --ignore-exclude-errors-x See [DEVELOPER_TOOLING.md](DEVELOPER_TOOLING.md) for other environments.