Modify clang-format hook script to show code style violations.

Issue #40 resolved
geisserf
created an issue

Currently, whenever a code style violation occurs during a commit, the hook script only shows which files violate the code style, but not where the style is violated. The developer then can:

  • Manually check which lines violate the style: use clang-format on the file, save the output, diff the output with the original file.
  • (clang-)format the whole file without caring which lines violated the style.

Since the first option is cumbersome, a developer might prefer option two; especially when one just wants to commit changes at the end of a day. However, there are times when code style violations are better fixed by refactoring the code in question.

If the first option is already automated by the hook script, developers might be more inclined to refactor some code.

Comments (1)

  1. Log in to comment