-
Notifications
You must be signed in to change notification settings - Fork 485
RemoveWildCardImports Lint issue #2571
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
Conversation
...ortsStep.java Co-authored-by: Owais Kazi <owaiskazi19@gmail.com>
...ix-RemoveWildcardImportsStep
nice one, thank you so much.
Most of the work is already done by @Pankraz76. I updated Lint changes on top of it. kindly request your feedback.
@owaiskazi19
@sbrannen
@nedtwigg
This is close! It needs
- ReplaceRegexStepTest which should be next to this
- right now it can only catch the first problem. but it would be easy to catch all of them
- in the format function, just return the input unchanged, don't throw
- in the lint function, return multiple lints
spotless/lib/src/main/java/com/diffplug/spotless/FormatterFunc.java
Lines 28 to 42 in 9cbdac8
public interface FormatterFunc {String apply(String input) throws Exception;default String apply(String unix, File file) throws Exception {return apply(unix);}/*** Calculates a list of lints against the given content.* By default, that's just an throwables thrown by the lint.*/default List<Lint> lint(String content, File file) throws Exception {return List.of();}- the exception thing is a hack for a formatter which is primarily about formatting. if you are primarily about linting, better to use the other method
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.
@nedtwigg
spotless:apply for maven does not show lint errors ? for gradle it does.
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.
aha! you are correct! i will try to fix that problem this week...
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.
is it resolved so we can continue, or is the issue bigger than expected?
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.
undo by inline. Thanks
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.
thanks
#2455
In maven-plugin too
please let fix this first and have this as second version.
Just fail the build with an bread error like done in open search. The detailed line number can follow afterwards not to block this issue.
Thank you @Pankraz76. please feel free to use these changes
Original PR: #2557