metafacture / metafacture-core

Core package of the Metafacture tool suite for metadata processing.
https://metafacture.org
Apache License 2.0
69 stars 34 forks source link

Add and apply Checkstyle config. #389

Closed blackwinter closed 2 years ago

blackwinter commented 3 years ago

Based on https://github.com/metafacture/metafacture-fix/blob/master/config/checkstyle/checkstyle.xml (metafacture/metafacture-fix#11).

We need those (annoying) checks from metafacture-fix here :-)

_Originally posted by @fsteeg in https://github.com/metafacture/metafacture-core/pull/387#discussion_r701908944_

This would be part 2 (see #388 for part 1).

Notes:

blackwinter commented 2 years ago

Oh well, looks like I've touched virtually every single Java file there is: 496/499 :exploding_head:

blackwinter commented 2 years ago

Uh, this is a lot of change ... hard to check everything.

Yes, sorry about that! But if it's any consolation, it was also a lot to write ;)

After my scanning I think it's good.

Thanks!

there are some tests changed - but it's just adding a newline before package declaration

I only applied very few automatic changes to the test sources.

blackwinter commented 2 years ago

Thanks for the review!

Oddly, I had to run ./gradlew editorconfigFormat locally once (but resulting in no changes on git diff) to get rid of violation errors (whitespace/newline issues).

So you had local (unversioned) files that were checked? Would you want those to get excluded/ignored?

fsteeg commented 2 years ago

So you had local (unversioned) files that were checked? Would you want those to get excluded/ignored?

No, no unversioned files. Maybe related to line endings managed by git internally (core.autocrlf)? No problem though, mostly a note in case anyone has the same issue locally.