Skip to content
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

Merged
merged 1 commit into from Mar 27, 2017

Conversation

nerzhul
Copy link
Member

@nerzhul nerzhul commented Mar 26, 2017

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

@nerzhul nerzhul added the @ Build CMake, build scripts, official builds, compiler and linker errors label Mar 26, 2017
@nerzhul
Copy link
Member Author

nerzhul commented Mar 26, 2017

When approval will be added i will remove the two test commits and merge the first commit

@sfan5
Copy link
Member

sfan5 commented Mar 26, 2017

wouldn't it be easier to have a blacklist?

@nerzhul
Copy link
Member Author

nerzhul commented Mar 26, 2017

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.
I think we should at a point fix coding style in little files/non opened/active PR files to permit remove this whitelist a little bit more faster

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
Copy link
Member

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

Copy link
Member Author

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

@sfan5
Copy link
Member

sfan5 commented Mar 27, 2017

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
@nerzhul nerzhul merged commit 4b05fea into minetest:master Mar 27, 2017
@nerzhul nerzhul deleted the clang_format_whitelist branch August 18, 2017 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Build CMake, build scripts, official builds, compiler and linker errors One approval ✅ ◻️
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants