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

Simplify Checkstyle configuration #17

Merged
merged 1 commit into from
Jan 3, 2024
Merged

Conversation

artembilan
Copy link
Member

  • Move checkstyle-conventions.gradle content to the build.gradle since it is short enough
  • Remove checkstyle-header.txt and its handling in favor of Spring Javaformat out-of-the box logic
  • Upgrade to Gradle 8.5
  • Remove suppression for Javadoc* checks since it is handled by Spring Javaformat
  • Leave only MissingJavadocMethodCheck exclusion from SpringChecks since all others really make sense for our code quality

@artembilan artembilan added type: task A general task theme: build An issue relating to our own build labels Jan 3, 2024
@artembilan artembilan added this to the 5.0.0-M1 milestone Jan 3, 2024
@artembilan artembilan requested a review from onobc January 3, 2024 16:24
@artembilan
Copy link
Member Author

It looks like Spring Javaformat has to be upgraded to the latest Checkstyle to make them all compatible with whatever we expect.
I mean that even Gradle 8.5 doesn't help 🤷

@artembilan
Copy link
Member Author

It looks like burrunan/gradle-cache-action scans console output for error and fails the build.
Unlike whatever we have with the jf gradle for SNAPSHOT build and when we run locally.
The ignoreFailures = true indeed has an effect, but with burrunan/gradle-cache-action for PRs it fails gathering all the errors in the end for final failure 🤷 :

BUILD SUCCESSFUL in 7m 28s
515 actionable tasks: 394 executed, 121 from cache
cacheid: 1737
cacheid: 1738
Cache Size: ~0 MB (5774 B)
Cache Size: ~0 MB (4638 B)
Error: [Task :spring-aggregator-function:checkstyleMain] [JavadocPackage] Missing package-info.java file.
Error: [Task :spring-aggregator-function:checkstyleMain] [SpringMethodVisibility] Method 'messageStore' in private class should not be public.

* Move `checkstyle-conventions.gradle` content to the `build.gradle` since it is short enough
* Remove `checkstyle-header.txt` and its handling in favor of Spring Javaformat out-of-the box logic
* Upgrade to Gradle `8.5`
* Remove suppression for `Javadoc*` checks since it is handled by Spring Javaformat
* Leave only `MissingJavadocMethodCheck` exclusion from `SpringChecks` since all others really make sense for our code quality
@artembilan artembilan force-pushed the Checkstyle_improvements branch from c40d79a to ce5162a Compare January 3, 2024 18:04
@artembilan artembilan closed this Jan 3, 2024
@artembilan artembilan reopened this Jan 3, 2024
build.gradle Show resolved Hide resolved
Copy link
Collaborator

@onobc onobc left a comment

Choose a reason for hiding this comment

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

LGTM thanks @artembilan

@artembilan artembilan merged commit f6eafc9 into main Jan 3, 2024
4 of 5 checks passed
@artembilan artembilan deleted the Checkstyle_improvements branch March 28, 2024 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: build An issue relating to our own build type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants