-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enforce coding style #39
base: master
Are you sure you want to change the base?
Enforce coding style #39
Conversation
PenaltyReturnTypeOnItsOwnLine: 60 | ||
PointerAlignment: Right | ||
ReflowComments: true | ||
SortIncludes: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be annoying as if sorts the included headers alphabetically. You usually want more flexibility on order of the included files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also specify include categories, which will provide some general rules on how the included headers will be sorted.
example:
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
Some commits could use some descriptions |
Signed-off-by: Daniel Guramulta <daniel.guramulta@analog.com>
Signed-off-by: Daniel Guramulta <daniel.guramulta@analog.com>
Signed-off-by: Daniel Guramulta <daniel.guramulta@analog.com>
- os: linux | ||
env: | ||
- OS_TYPE=clangformat | ||
addons: { apt: { packages: ["clang-format-6.0"], sources: ["llvm-toolchain-xenial-6.0"] } } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curios: would this work? addons: { apt: { packages: ["clang-format-6.0"], sources: ["llvm-toolchain-${TRAVIS_DIST}-6.0"] } }
also, is ther a generic llvm-toolchain-6.0
addon?
i would not add xenial
if possible; otherwise, it's probably better to add dist: xenial
back to make sure things stay consistent (sorry about that, if it happens)
commits could use a description |
Enforce coding style on commits.
To prevent files mixing different coding styles
we make Travis check the style of the files, being edited(patched) in the commit(commit range), and if something is not formatted according to the
.clang-format
files specifications, we fail the build.For this to go through, we need:
.clang-format