0

In c# where is a setting "EnforceCodeStyleInBuild" that allows to fail build if code doesn't align with rules from .editorconfig. C++ supports editorconfig as well, but I can't find a way how to fail build if there is a mistake in formatting as we can do in c#.

I expect that editirconfig in c++ can affect build.

2
  • In C++ clang-format is industry standard. It doesn't "fail the build" it just reformats code. I never seen someone would fail build if formatting is not aligned with clang-format settings. Commented Jan 15, 2024 at 17:28
  • You can change your build to run clang-format and check for changes: stackoverflow.com/questions/22866609/… Commented Jan 15, 2024 at 17:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.