Code linting and Formatting #130
Replies: 4 comments 4 replies
-
I just used cpplint to check a file I have been refactoring. It was really useful in identifying spaces at the end of lines. However because it uses the Google styling format you have to run it with While using cpplint I thought it might be useful to have a SWMM 5 Style Guide for this project. A draft version of such a guide, based on the style currently used throughout SWMM, is attached. |
Beta Was this translation helpful? Give feedback.
-
A lot of good ideas to consider with all of the internal planning that is ongoing. |
Beta Was this translation helpful? Give feedback.
-
I need to add that we are strongly considering adopting doxygen to document the code and for doing the documentation for SWMM in general. The style we are adopting will therefore have to conform to it. An example can be found here. |
Beta Was this translation helpful? Give feedback.
-
@cbuahin Shouldn't be a problem to accommodate Doxygen format in the style guide. |
Beta Was this translation helpful? Give feedback.
-
Dare I ask, @michaeltryby and @cbuahin what are your opinions of adding linters to the C/CPP/H/HPP files? As I continue to merge in the updates from EPA into PySWMM's SWMM codebase, I find that spaces appear and then disappear. It would be cool if we could go through the merge pain one time with a freshly linted and code format strategy.
We had this wild idea years ago at the former "OWA-SWMM", now PySWMM(SWMM), project. However, we decided against it since the USEPA upstream wasn't not heading in the direction. I am for sure grateful that the codebase is working toward dropping the line comments specifying the codebase version introducing the changes.
Here is the PR: pyswmm#88
Beta Was this translation helpful? Give feedback.
All reactions