Closed stvdwtt closed 3 months ago
Thank you, Steve
I think it is a good idea. This would only change the style of the code files, right?
Yes, feel free to add the .clang-format file and reformat the code files accordingly.
Sounds good. Do you want me to create a pull request into "master", or do you have a development branch for the next release?
You can do a PR into master.
Add a description of the clang-format we use somewhere in the documentation.
The clang compiler has a standalone tool called "clang-format" that automatically formats C++ code according to user-specified options. The benefit is that this ensures consistency across a code base and eliminates the need for developers to think about formats. I've used this in a few different projects, and it works really well. Some code editors can automatically format code on save (e.g. VS Code, Atom) or it can be applied manually.
Here's some info on how to use it: https://www.clangpowertools.com/blog/getting-started-with-clang-format-style-options.html
To do this, the best way is to add a ".clangf-ormat" file in the root directory of the repository. An example of one is here: https://github.com/adamantine-sim/adamantine/blob/master/.clang-format
@david-montiel-t what do you think of moving PRISMS-PF to this? If you want, I'd be happy to make a style file and do the initial reformat of all of the files.