Skip to content

Conversation

@wadoon
Copy link
Member

@wadoon wadoon commented Jan 22, 2025

Someone deactivated Sonarqube. We seem to have a deeper inner confusion with our common understanding of clean code. This is my last attempt at getting something going, after this I am on my wit's end.

First, this PR reactivates the Checkstyle using updated versions of the GitDiffFilter, which are now externalized as Maven dependencies. The code of the diff filter are here: https://github.com/wadoon/checkstyle-key-extensions. Ownership transferred on acceptance, also published on Maven Central.

The address of the diff is

        checkstyle("org.key-project.devel:checkstyle-key-extensions:1.17-SNAPSHOT")

which can then be used across projects. The checkstyle-key-extensions are updated to the latest version of checkstyle, which has two filters now: one for files before parsing, one for issues after linting. checkstyle-key-extensions uses both.

Checkstyle is invoked via Gradle via checkstyleMain and checkstyleTest. Dependencies are managed by Gradle.

The bottleneck is the limited reported possibilities on Github. This PR tries to use everything.

  1. A Markdown Job summary is added
    image

  2. Sarif files are joined and uploaded:
    image

  3. HTML checkstyle artifacts can be downloaded
    image

  4. Moreover, it simplifies the Jacoco integration.

  5. At the end of the Github tests runs, a Gradle task reads JUnit test xml reports and prints out Github annotations. Failing tests should appear on the Github workflow summary.

    image

It does not add a comment to the PR as this is not reliable due to reduced permissions on workflow executions for foreign repositories.

Testing

Testing of this PR is hard. You need

  1. failing test cases
  2. checkstyle violations

It might be a good choice to merge this branch squashily on some of your working branches for testing.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@wadoon wadoon requested a review from mattulbrich January 22, 2025 15:47
@wadoon wadoon self-assigned this Jan 22, 2025
@wadoon wadoon added 🛠 Maintenance Code quality and related things w/o functional changes github_actions Pull requests that update GitHub Actions code labels Jan 22, 2025
@wadoon wadoon added this to the v2.12.4 milestone Jan 22, 2025
@wadoon wadoon changed the title testing checkstyle Reactivate Checkstyle Jan 22, 2025
@wadoon
Copy link
Member Author

wadoon commented Jan 22, 2025

Missing check, if no Java files were altered.

@KeYProject KeYProject deleted a comment from codecov bot Jan 29, 2025
@mattulbrich
Copy link
Member

Someone deactivated Sonarqube. We seem to have a deeper inner confusion with our common understanding of clean code.

If there is confusion, should that not be cleared first? What is the confusion about?

@wadoon
Copy link
Member Author

wadoon commented Feb 20, 2025

If there is confusion, should that not be cleared first? What is the confusion about?

This was just an euphemism for we agreed on Sonarcube, set up the rules, and someone deactivates it. This leads to questions.

Copy link
Member

@mattulbrich mattulbrich left a comment

Choose a reason for hiding this comment

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

The newly introduced check still fails.

Regarding tools like SonarCube:
CodeQuality measuring gates help improve the code. However, they must work properly. If they fail consistently and are not repaired, they should be turned off.

@mattulbrich mattulbrich added the Reviewer Feedback Feedback from the review needs to be addressed label Feb 22, 2025
@wadoon wadoon force-pushed the weigl/checkstyle branch 2 times, most recently from 1947eb5 to a827455 Compare March 12, 2025 17:28
@wadoon wadoon force-pushed the weigl/checkstyle branch from a827455 to 6735ac7 Compare June 8, 2025 14:09
@wadoon wadoon force-pushed the weigl/checkstyle branch from 6735ac7 to e7b6573 Compare June 29, 2025 22:47
@wadoon wadoon force-pushed the weigl/checkstyle branch from e7b6573 to d381274 Compare July 16, 2025 16:03
@KeYProject KeYProject deleted a comment from codecov bot Jul 16, 2025
@KeYProject KeYProject deleted a comment from codecov bot Aug 13, 2025
@wadoon wadoon force-pushed the weigl/checkstyle branch 2 times, most recently from 238f19a to 0b6cabb Compare August 13, 2025 05:14
@KeYProject KeYProject deleted a comment from codecov bot Aug 13, 2025
@wadoon wadoon requested a review from mattulbrich August 13, 2025 05:14
@codecov
Copy link

codecov bot commented Aug 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.98%. Comparing base (2aa39bb) to head (124e908).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3539      +/-   ##
============================================
- Coverage     47.99%   47.98%   -0.01%     
+ Complexity    16046    16042       -4     
============================================
  Files          1683     1683              
  Lines         96044    96044              
  Branches      15387    15387              
============================================
- Hits          46093    46087       -6     
- Misses        44681    44686       +5     
- Partials       5270     5271       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wadoon wadoon removed the Reviewer Feedback Feedback from the review needs to be addressed label Sep 20, 2025
@wadoon wadoon force-pushed the weigl/checkstyle branch 3 times, most recently from 99932e8 to 3655546 Compare September 20, 2025 01:12
@wadoon wadoon marked this pull request as draft September 25, 2025 16:28
@wadoon wadoon marked this pull request as ready for review September 25, 2025 17:51
@wadoon wadoon modified the milestones: v2.13.0, v2.14.0 Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code 🛠 Maintenance Code quality and related things w/o functional changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants