Skip to content
This repository has been archived by the owner on Sep 13, 2018. It is now read-only.

How to ignore Path '/build/generated/source/apt/debug/...' #42

Closed
fifa0329 opened this issue Jun 2, 2017 · 1 comment
Closed

How to ignore Path '/build/generated/source/apt/debug/...' #42

fifa0329 opened this issue Jun 2, 2017 · 1 comment
Labels

Comments

@fifa0329
Copy link

fifa0329 commented Jun 2, 2017

I use data binding in my app project,
so it generates XXXbinding.java automatically
but I don't want errorprone works for the generated files

Messages output:

Information:Gradle tasks [:kepler:assembleDebug]
/Users/wlx/kepler4android/kepler/build/generated/source/apt/debug/com/taobao/kepler/common/databinding/ToolbarBreadcrumbsLayoutBinding.java
Error:(51, 20) 警告: [MissingOverride] setVariable implements method in ViewDataBinding; expected @Override
(see http://errorprone.info/bugpattern/MissingOverride)
Did you mean '@Override public boolean setVariable(int variableId, Object variable) {'?

I use

tasks.withType(JavaCompile) {
    options.compilerArgs += ['-XepDisableWarningsInGeneratedCode']
}

in my app build.gradle,but it doesn't work

@tbroyer
Copy link
Owner

tbroyer commented Jun 2, 2017

See google/error-prone#329 (which led to introduce the -XepDisableWarningsInGeneratedCode) and google/error-prone#463
Also google/error-prone#523 and google/error-prone#599

In your case though, even if ToolbarBreadcrumbsLayoutBinding were annotated with @Generated, Error Prone detects an error, not a warning, so -XepDisableWarningsInGeneratedCode doesn't apply. You could use -Xep:MissingOverride:WARN to downgrade MissingOverride to a warning (or even turn it off if you prefer), and/or ask the annotation processor author to fix/enhance their generated code.

In any case, this is not an issue with this plugin, which works as intended here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants