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

Create configuration to hint IDE and source code editor #5211

Open
jcfr opened this issue Sep 29, 2020 · 3 comments
Open

Create configuration to hint IDE and source code editor #5211

jcfr opened this issue Sep 29, 2020 · 3 comments
Labels
Type: Enhancement Improvement to functionality
Milestone

Comments

@jcfr
Copy link
Member

jcfr commented Sep 29, 2020

Is your feature request related to a problem? Please describe.

The review process is tedious as a significant amount of time is spent providing stylistic feedback.

Describe the solution you'd like

Create configuration file minimizing the amount of changes to existing source files

Depending on the language, they are few options:

Describe alternatives you've considered

NA

Additional context

@jcfr jcfr added the Type: Enhancement Improvement to functionality label Sep 29, 2020
@lassoan lassoan added this to the Backlog milestone Jun 23, 2021
@HarryDC
Copy link
Contributor

HarryDC commented Aug 10, 2022

One of the ways to get this started is to start small and start using a configuration, be that clang-format or editorconfig pick a configuration that matches the current format basically beta-test it in a few places.

Not sure if a step of reformatting the whole repository is really necessary by pushing the tools at least the active parts of the codebase would trend towards consistent formatting. A second step would be to figure out how to apply styling automatically. I haven't dealt much with git hooks, i rely on visual studio to apply the formatting automatically (usually just on save) http://www.manobit.com/code-beautifier-for-visual-studio/ can be configured for a variety of tools.

Another option that some people seem to like https://github.com/uncrustify/uncrustify

https://gitlab.kitware.com/iMSTK/iMSTK/-/blob/master/Utilities/Uncrustify/iMSTKUncrustify.cfg

But i feel that the number of options in there can just lead to spending way to much time fiddling with the options

Between editorconfig and clang-format the main question is probably if you just want to enforce tabs and spaces or go a little further to things like function definition format, , spacing, etc. then clang-format is probably the most supported. https://clangpowertools.com/clang-format-editor.html could be used to find a starting config for the first phase

@Thibault-Pelletier
Copy link
Contributor

I'm bumping this issue. For rare contributors like myself, a clang-format would be very useful when contributing and not having to manually modify the style for the modified lines.

In most IDEs, you can select the lines you want to auto format which makes it easier to only apply style to the modifications and leave the rest of the file untouched!

@jcfr
Copy link
Member Author

jcfr commented Mar 14, 2024

a clang-format would be very useful

This is being integrated through:

To summarize, we will soon have a .clang-format available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Improvement to functionality
Development

No branches or pull requests

4 participants