-
Notifications
You must be signed in to change notification settings - Fork 8
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
Upgrade Doxia to 2.x stack #160
Conversation
Will take a look... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are several problems in src/main/java/org/codehaus/mojo/taglist/TagListReport.java
:
- The XRef link calcucation should be done like here: https://github.com/apache/maven-pmd-plugin/blob/c27ea6aabdf95797d0f25f1d60875bf485857aa8/src/main/java/org/apache/maven/plugins/pmd/AbstractPmdReport.java#L87-L101 and here https://github.com/apache/maven-pmd-plugin/blob/c27ea6aabdf95797d0f25f1d60875bf485857aa8/src/main/java/org/apache/maven/plugins/pmd/AbstractPmdReport.java#L286-L323
- Locale handling is wrong:
taglist-maven-plugin/src/main/java/org/codehaus/mojo/taglist/TagListReport.java
Lines 148 to 151 in 5bcba29
/** * The locale used for rendering the page. */ private Locale currentLocale; taglist-maven-plugin/src/main/java/org/codehaus/mojo/taglist/TagListReport.java
Lines 528 to 534 in 5bcba29
public Locale getLocale() { // The locale string should never be null. if (sourceFileLocale == null) { sourceFileLocale = DEFAULT_LOCALE; } return new Locale(sourceFileLocale); } - You should all methods which are already present in the parent class
src/main/java/org/codehaus/mojo/taglist/ReportGenerator.java
:
- It should be called
...Renderer
and inherit fromAbstractMavenReportRenderer
- Maybe move when the move has been done
@michael-o - next part of changes ... |
282e583
to
ab4ffee
Compare
src/main/java/org/codehaus/mojo/taglist/TaglistReportRenderer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will import the code into my IDE and do another review.
@@ -73,7 +72,7 @@ public class FileAnalyser { | |||
/** | |||
* The Locale of the files to analyze. | |||
*/ | |||
private final Locale locale; | |||
private final Locale sourceFileLocale; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sourceFilesLocale
, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a sourceFileLocale
parameter of Mojo report ... so let to be consistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, both need to be consistent with a TODO.
Is this on purpose:
If yes, it should have a comment... |
Regarding: taglist-maven-plugin/src/main/java/org/codehaus/mojo/taglist/TagListReport.java Lines 638 to 641 in 408c9a6
Though it is not wrong, the canonical way is to use the I18n class via DI. See PMDReport.java
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last round of comments
src/main/java/org/codehaus/mojo/taglist/TaglistReportRenderer.java
Outdated
Show resolved
Hide resolved
f662613
to
2e31b1e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This good enough, let's go.
No description provided.