-
Notifications
You must be signed in to change notification settings - Fork 131
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
patch-diff-report-tool: should preserve stylesheet.css from jxr site #424
Comments
jxr and maven-checkstyle-plugin inside jxr generation of Java file for final report is done inside https://github.com/checkstyle/contribution/blob/master/patch-diff-report-tool/src/main/java/com/github/checkstyle/site/XrefGenerator.java#L84 and https://github.com/checkstyle/contribution/blob/master/patch-diff-report-tool/src/main/java/com/github/checkstyle/site/XrefGenerator.java#L142-L144 and that is where CSS would have to be injected. The only thing the tool lets you do is inject a footer. http://rveach.no-ip.org/checkstyle/regression/reports/262/checkstyle/xref/src/it/resources/com/google/checkstyle/test/chapter4formatting/rule4842fallthrough/InputFallThrough.java.html
As I am not seeing this stylesheet anywhere, you could just add code to plop this file into the right directory and possibly all Java files would use it. Going this route, however, means our custom TextTransform at contribution/patch-diff-report-tool/src/main/java/com/github/checkstyle/site/TextTransform.java Line 220 in 3d26913
|
https://github.com/apache/maven-jxr/blob/6e0098709e4b5e392909638aabfed911b4b2f9a1/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AbstractJxrReport.java#L266 It is not really a solution as what we need is for the utility to allow us to add more Example: https://github.com/apache/maven-jxr/blob/15d6b3908b6340e127650dbc0a9fc2007d75beea/maven-jxr/src/main/java/org/apache/maven/jxr/JavaCodeTransform.java#L149 It also looks to me, that this would even fully break apart when we do shorten file names for Windows users as it is still basing logic on package name and not the save location. Our choices seem to be:
@romani ping |
I do not want to depend on maven plugin. |
@rnveach would (2) help us to migrate from maven plugin? |
I assume we are not referring to maven-checkstyle-plugin, as that has no bearing here for patch-diff-report. If we are referring to the JXR plugin which generates the Java HTML file for us, then to get away from it we have to drop the dependency completely. This means option 1 is the only solution as all others rely on the JXR plugin to do the work for us. However, to completely drop JXR requires us to duplicate many core files. I don't know how many there will be or how much there will be but it does NOT seem like this is the easiest solution. |
Let's use easy solution for now |
We do read sources generated by JXR.
unfortunately tool does not copy it to
diff
folder, so sources become plain text.customization of css:
custom css, should use default + our customization for higlihting of target (anchored) line.
to make it look like:
The text was updated successfully, but these errors were encountered: