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

Auto indent using shfmt #215

Closed
wants to merge 12 commits into from
Closed

Auto indent using shfmt #215

wants to merge 12 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jun 28, 2021

This is the auto indention output using shfmt via the VSC extension shell-format. Just to show you a possible auto indention tool...

@ghost ghost marked this pull request as draft June 28, 2021 18:27
@koecher
Copy link
Contributor

koecher commented Jun 29, 2021

Can you prepare a bash script, e.g. indent.sh instead of requesting the result?

@ghost ghost mentioned this pull request Jun 29, 2021
23 tasks
@ghost ghost marked this pull request as ready for review February 14, 2022 21:18
@ghost
Copy link
Author

ghost commented Feb 14, 2022

@tjhei @koecher this introduces now a CI job very similar to the dealii/dealii indent job. It checks all shell files with the shfmt formatter. Options are -ln bash -i 2 -bn -ci -sr. An initial indentation of all files is necessary to make the Job happy.

Some questions/remarks:

  • How do we proceed with the headers. Originally this is dealii code, but adapted to candi.
  • In the git log history there are some commits with user names, which do not fit into the scheme. For simplicity just start the rules from 2022-01-01.
  • Do we want to have the indent job necessary (Required) for new PRs, as in dealii?

@koecher
Copy link
Contributor

koecher commented Feb 15, 2022

@gfcas Thanks!

as the code is from deal.II, we keep the original header and maybe include a second one for our changes - similar to candi.sh

I'm fine with the date from 2022 on.

We should require to use it for a PR. Otherwise we need to do this on our own and nobody has the time for this.

contrib/utilities/indent_common.sh Outdated Show resolved Hide resolved
contrib/utilities/indent_common.sh Outdated Show resolved Hide resolved
.github/workflows/indent.yml Outdated Show resolved Hide resolved
contrib/utilities/check_encoding.py Outdated Show resolved Hide resolved
@koecher
Copy link
Contributor

koecher commented Feb 19, 2022

@tjhei Thanks for taking that over and your review.

@ghost ghost mentioned this pull request Apr 29, 2022
@ghost ghost closed this Dec 1, 2022
@ghost ghost deleted the auto_indent branch December 1, 2022 14:24
This pull request was closed.
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.

2 participants