* Add .astylerc with the core coding standard * Added pre-commit git hook The hook currently only checks code format using astyle and will not permit commits which cause astyle to change the contents of any source file in the commit. This is useful to have automatic coding standard verification done without having to wait for Jenkins to react to a pull request. Installation: Linux: ln -s ../../tools/hooks/pre-commit.sh .git/hooks/pre-commit Windows: copy tools\hooks\pre-commit.sh .git\hooks\pre-commit * Added editorconfig and updated gitattributes Unix style line endings are now default. * Resolved doxygen warning
24 lines
692 B
Plaintext
24 lines
692 B
Plaintext
# Coding standard for MySensors core library (see https://www.mysensors.org/download/contributing)
|
|
|
|
# Curly braces should follow "One True Brace Style" format
|
|
style=1tbs
|
|
|
|
# All control statements ('if', 'for', 'while' etc.) should include curly braces {}. Even one-liners.
|
|
add-brackets
|
|
|
|
# Tab-character for white space/indentation
|
|
indent=tab
|
|
|
|
# All lines should be kept at 100 character width or less
|
|
max-code-length=100
|
|
break-after-logical
|
|
|
|
# Preprocessor blocks should be indented
|
|
indent-preproc-block
|
|
|
|
# Preprocessor definitions should be indented if linebroken
|
|
indent-preproc-define
|
|
|
|
# C++ comments should be indented to source level, and not be kept in first column
|
|
indent-col1-comments
|