Skip to content

Conversation

@kohlschuetter
Copy link
Contributor

Currently, not all code is systematically formatted, which complicates the contribution process, diffing, etc.

Add automatic code formatting based on Eclipse formatter rules and impsort for "Organize imports"-style reformatting.

Provide formatting rules that are very similar to the current code style.

Add a script ("script/reformat-code.sh") to simplify reformatting code upon demand (it is not performed by default).

Currently, not all code is systematically formatted, which complicates
the contribution process, diffing, etc.

Add automatic code formatting based on Eclipse formatter rules and
impsort for "Organize imports"-style reformatting.

Provide formatting rules that are very similar to the current code
style.

Add a script ("script/reformat-code.sh") to simplify reformatting code
upon demand (it is not performed by default).

Signed-off-by: Christian Kohlschütter <[email protected]>
@kohlschuetter
Copy link
Contributor Author

kohlschuetter commented Jun 15, 2025

@kofemann @hamletson If you're OK with this, could you please run the script and commit the changes yourself? This way, you can be sure that only reformatted changes made it in the repo.

It's also good practice to have the reformat commit added to a ".git-blame-ignore-revs" file, which improves the "git blame" experience by ignoring such commits. See for example https://gist.github.com/kateinoigakukun/b0bc920e587851bfffa98b9e279175f2

@kofemann
Copy link
Member

git blame is the main reason reason why we tried to avoid reformats. Thanks for the hint. I will give it a try.

@kofemann kofemann merged commit e37f05d into dCache:master Jun 16, 2025
1 check passed
kofemann added a commit that referenced this pull request Jun 16, 2025
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.

2 participants