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

Add utilities for checking code #2154

Merged
merged 3 commits into from Jun 15, 2020
Merged

Conversation

rbberger
Copy link
Member

@rbberger rbberger commented Jun 13, 2020

Summary

  • Adds whitespace utility to check and fix common whitespace and file encoding issues
  • Adds check-whitespace and fix-whitespace targets to cmake build
  • Adds check for file permissions (e.g. source files or input scripts shouldn't be executable)
  • Add check-permissions and fix-permissions targets to cmake build

Author(s)

@rbberger

Licensing

By submitting this pull request, I agree, that my contribution will be included in LAMMPS and redistributed under either the GNU General Public License version 2 (GPL v2) or the GNU Lesser General Public License version 2.1 (LGPL v2.1).

Backward Compatibility

Implementation Notes

Post Submission Checklist

  • The feature or features in this pull request is complete
  • Licensing information is complete
  • Corresponding author information is complete
  • The source code follows the LAMMPS formatting guidelines
  • Suitable new documentation files and/or updates to the existing docs are included
  • The added/updated documentation is integrated and tested with the documentation build system
  • The feature has been verified to work with the conventional build system
  • The feature has been verified to work with the CMake based build system
  • A package specific README file has been included or updated
  • One or more example input decks are included

Further Information, Files, and Links

@akohlmey akohlmey self-assigned this Jun 13, 2020
@akohlmey akohlmey added this to the Stable Release Summer 2020 milestone Jun 13, 2020
@akohlmey
Copy link
Member

@rbberger perhaps it would make sense to also include clang-format processing (#2157) into this and make it a make target, too. But there would need to be some way to apply it only to selected folders (either through some way that is internal to clang-format or some (per folder?) signaling that the make command will check for).

@junghans
Copy link
Member

@rbberger perhaps it would make sense to also include clang-format processing (#2157) into this and make it a make target, too. But there would need to be some way to apply it only to selected folders (either through some way that is internal to clang-format or some (per folder?) signaling that the make command will check for).

@rbberger have a look here:
https://github.com/votca/votca/blob/d022cdf131d32a315dd7f52d09869e022d2f3852/share/format/CMakeLists.txt#L1-L12
with
https://github.com/votca/votca/blob/d022cdf131d32a315dd7f52d09869e022d2f3852/CMakeModules/FindCLANG_FORMAT.cmake#L22-L51

One caveat with clang-format is that different major versions will format the code slightly differently.

@rbberger
Copy link
Member Author

See e840fa2

@akohlmey akohlmey merged commit 4a3d9af into lammps:master Jun 15, 2020
@rbberger rbberger deleted the coding_standard branch October 6, 2020 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants