checkstyle / contribution

some useful sources that should not stay in main repo but it is good to host them
GNU Lesser General Public License v2.1
49 stars 131 forks source link

Patch-diff-report-tool: shorten file names is not doing anything #900

Open rnveach opened 3 months ago

rnveach commented 3 months ago

https://github.com/checkstyle/contribution/blob/master/patch-diff-report-tool/src/main/java/com/github/checkstyle/site/SiteGenerator.java#L219

Example: https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/7e9dba3_2024170824/reports/diff/checkstyle/index.html#Violations

/home/runner/work/checkstyle/checkstyle/.ci-temp/contribution/checkstyle-tester/repositories/checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/fallthrough/InputFallThrough4.java

Example from my launch script:

src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/treewalker/InputTreeWalkerSkipParsingExceptionConfigSeverityIgnore.java

My launch scripts don't have this issue but I don't remember how it was resolved. It could be because they are running checkstyle directly and groovy is still calling the maven plugin.

rnveach commented 3 months ago

File names in report are shortened at https://github.com/checkstyle/contribution/blob/eed618f3f607c059bbe631f508b8f04902a19bb0/patch-diff-report-tool/src/main/java/com/github/checkstyle/site/SiteGenerator.java#L174 .

I assume our GH action isn't working with this, while the diff scripts are, is because of the maven plugin and files have to be copied to a different location to be run on. The diff scripts run CS directly on the folder they are cloned from.

Also this is not very well documented effect at https://github.com/checkstyle/contribution/tree/master/patch-diff-report-tool