-
Notifications
You must be signed in to change notification settings - Fork 460
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
AndroidLint support #1089
Comments
It doesn't, but we'd be happy to take a PR which adds it. In this and #143 you're proposing adding support for linting tools rather than formatters. A key thing to understand about Spotless' current model is that a Perhaps we could create a new infrastructure for linters like so: public class Lint {
int lineStart, lineEnd;
String lintId;
String comment;
@Nullable String replacement;
}
public interface LintStep {
public List<Lint> lintsFor(String formattedUnix, File file);
} We could then add a spotless/lib/src/main/java/com/diffplug/spotless/Formatter.java Lines 45 to 46 in c66f83e
A computed result would become Whenever adding a big feature like that, I think it's key to have at least two actual clients and ideally three. We now have:
So I think that's enough to test this out. If anyone is interested in writing something along these lines I'd be happy to help them. |
Sounds great. So i think. detekt should be implemented with that model |
I'll push up a draft PR for the infrastructure of this. |
In fact ktlint is linter too, not only formatter. May be more correct abstraction for spotless is Or we shoud create two kind of aggregation? Formatter and Linter. |
A PR against #1097 would be very welcome, for any of the linters discussed :) |
I have a large project, I would like not to check it all. I only want to check the changed files. AndroidLint haven't that feature. I need to write wrapper to implement it. It can be cool, if i can use AndroidLint from spotless with git ratchet feature.
Does spotless support AndroidLint?
The text was updated successfully, but these errors were encountered: