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

Add new showLint compiler configuration #131

Merged
merged 2 commits into from
Apr 29, 2021

Conversation

bondolo
Copy link
Contributor

@bondolo bondolo commented Apr 25, 2021

Adds the ability to configure additional non-default compiler warnings and lint. To be used for the javac -Xlint or similar features of the ECJ compiler. The option will be added to the maven-java-compiler plugin (which depends upon plexus-compiler)

@olamy
Copy link
Member

olamy commented Apr 25, 2021

thanks @bondolo for your contribution. I just added some nit comments :) but sounds a nice enhancement

@olamy olamy added enhancement java Pull requests that update Java code labels Apr 25, 2021
@olamy olamy self-assigned this Apr 25, 2021
Adds the ability to configure additional non-default compiler warnings and lint. To be
used for the javac -Xlint or similar features of the ECJ compiler.
plexus-compiler-its/pom.xml Outdated Show resolved Hide resolved
remove added whitespace.
@bondolo bondolo requested a review from olamy April 28, 2021 21:12
Copy link
Member

@olamy olamy left a comment

Choose a reason for hiding this comment

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

@bondolo Thanks!

@olamy olamy merged commit 56c109a into codehaus-plexus:master Apr 29, 2021
return warnings;
}

public void setShowLint( String warnings )
Copy link
Contributor

Choose a reason for hiding this comment

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

I find this lack of symmetry between get/set/field disturbing.
Also - other setShow*s seem to accept boolean.

Copy link
Member

Choose a reason for hiding this comment

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

@pzygielo ah yes I agree It's confusing I will change that

Copy link
Member

Choose a reason for hiding this comment

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

ah yes good point I agree

Copy link
Member

Choose a reason for hiding this comment

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

@pzygielo @bondolo what about #132
btw this fix the Xlint with no args which is possible

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem was that there was an existing showWarnings() flag. The intention was that the warnings flag would still control whether lint would be shown to avoid the weird corner case where warnings were disabled and lint was configured.
warnings enabled : show errors, warnings and "lint"
warnings disabled : show errors only.

olamy added a commit that referenced this pull request Apr 29, 2021
olamy added a commit that referenced this pull request May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement java Pull requests that update Java code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants