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

Fix/whitespace and formatting #1049

Merged
merged 46 commits into from
Dec 7, 2023

Conversation

timfelle
Copy link
Collaborator

@timfelle timfelle commented Dec 1, 2023

This is more a suggestion of how to handle formatting in a unified way.

findent was used to reformat all files according to the code style guide.

findent can be integrated directly into Vim, Emacs and GEdit.
In VSCode the ModernFortran package allow the use of "findent"

export FINDENT_FLAGS="-i2 -d3 -f3 -s3 -w3 -t3 -j3 -k- -Rr -c3"
find src/ -name "*.f90" -exec bash -c 'findent < {} > {}.tmp; mv -f {}.tmp {}' \;

@timfelle timfelle force-pushed the fix/whitespace_and_formatting branch from f6fab3c to 25c1005 Compare December 1, 2023 10:20
@timfelle
Copy link
Collaborator Author

timfelle commented Dec 1, 2023

The force push was a rebase onto the newest develop branch.

Documentation now includes the options for findent which reproduce the
target formatting.
@timfelle timfelle force-pushed the fix/whitespace_and_formatting branch 2 times, most recently from 2f8f1e8 to 1dd77db Compare December 1, 2023 13:33
@timfelle timfelle marked this pull request as draft December 1, 2023 13:40
src/adt
src/bc
src/comm
src/common/bcknd
src/common/ Without multiline strings.
@timofeymukha
Copy link
Collaborator

Nice!

@timfelle timfelle marked this pull request as ready for review December 4, 2023 17:52
Copy link
Collaborator

@njansson njansson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, however not sure what todo with the legacy speclib file, which the linter has a hard time with

@timfelle
Copy link
Collaborator Author

timfelle commented Dec 6, 2023

Please note that i have added a Formatting CI rule.
This now checks if the format described in our code style guide is followed for pull requests.
This is something we might want to change to be just committed instead of throwing an error. However, I do not have wide enough permissions to setup git access tokens and such in the secrets.

(I also have never tried doing something like that, but i found a few stack overflow pages mentioning it.)

@njansson njansson merged commit f90d67b into ExtremeFLOW:develop Dec 7, 2023
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants