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

Update the Code Style Guide section to match the .clang-format tool decisions #133

Closed
jhlegarreta opened this issue Sep 25, 2019 · 1 comment · Fixed by #170
Closed

Update the Code Style Guide section to match the .clang-format tool decisions #133

jhlegarreta opened this issue Sep 25, 2019 · 1 comment · Fixed by #170
Labels
type:Enhancement Improvement of existing methods or implementation

Comments

@jhlegarreta
Copy link
Member

Since the merge of PR 1191 to the ITK repository, code formatting has been automatized with .clang-format.

A number of decisions were made based on the answers on the corresponding discourse post to define the style.

Thus, the Coding Style Guide section should be adapted to the adoption of the tool.

Maintaining both may be difficult as it has been until now when some change is introduced in the style. Although it is the .clang-format tool that will ultimately dictate the style in an automatic fashion, explaining the result it produces as the code layout with real examples may be useful to contributors.

Thus, there would be at least two possibilities to update the fiel/section:

  • Remove most of the contents of the file since ultimately .clang-format will take care of the formatting and explain how .clang-format takes care of the style.
  • Mention that the style is automated by the .clang-format tool, but re-work the current sections with examples to match what the .clang-format file dictates.

Also, the .clang-format tool dictates the C++ style, so for the Python ITKExamples we would still be missing a similar tool and/or a section in the ITK SW Guide (see issue #118).

@hjmjohnson
Copy link
Member

Revisit discussion on using ternary operators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Enhancement Improvement of existing methods or implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants