-
Notifications
You must be signed in to change notification settings - Fork 2k
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
clang-format: add a whitelist #5459
Conversation
c28406f
to
373a9f4
Compare
Soft fail test commit: https://travis-ci.org/minetest/minetest/builds/215263717 => https://travis-ci.org/minetest/minetest/jobs/215263724 |
When approval will be added i will remove the two test commits and merge the first commit |
wouldn't it be easier to have a blacklist? |
what do you want to blacklist ? the currently valid files ? it's better to dynamicly have every file checked and whitelist non formatted files, and after a file is valid, remove it from whitelist, and at the end, remove blacklist/whitelist support. |
util/travis/script.sh
Outdated
whitelisted=$(egrep -c "^${f}" "${CLANG_FORMAT_WHITELIST}") | ||
|
||
# If no failure recorded and file is not whitelisted, mark a failure | ||
if [ ${fail} -eq 0 ] && [ ${whitelisted} -eq 0 ]; then |
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.
the ${fail} -eq 0
is very confusing here as it doesn't actually matter
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.
exact, i will remove it
Nevermind it's okay like this |
If file is in the whitelist, softfail, else hard failure Some files are not in whitelist and marked as normal: * src/content_mapnode.h * src/cguittfont/xCGUITTFont.cpp * src/gameparams.h * src/profiler.cpp
f6b736c
to
e661a76
Compare
If file is in the whitelist, softfail, else hard failure
Some files are not in whitelist and marked as normal: