Adding a formatter/check like astyle/codecheck #26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @gtribello, look if you like this:
I added a formatter and a static check that helps in looking for errors (such as unused variables/imports, wrong variables hidden in raised exceptions, it seems to dislike using 'l' as variable since it is similar to 'I', and so on)
This should help in tracking future merges/changes like we do with astyle and codecheck in plumed
I chose to use and indent of 2 spaces, but this is an opinionated choice of mine, I can change it
To format things on your pc you simply need to run
toxin the home directory of the project:it will
in this order
to run the check alone you can run
ruff format(ortox -e format),ruff check(ortox -e linting)The CI will softly enforce the check and the formatting, but with no interference in the the old tests