Comments (3)
Good case! This is a quality plugin issue.
The root problem is that new spotbugs plugin use gradle properties instead of direct fields, which force me to do many hacks to init them early because otherwise values simply ignored (read property can't be updated and gradle read task properties too early). As a result:
- exclusion config is always forcefully substituted (because I can't read property to look if there already custom value - properly would be locked)
- exclusion logic applied too early (because spotbugs task property gets evaluated too early) and no actual exclusions get registered (files not yet generated)
The only workaround for you now is to modify default exclusions file:
- Init configs with: gradlew initQualityConfig
- Remove everything in gradle/config except spotbugs/exclude.xml (default files will be used implicitly)
- Add your manual exclusion to exclude.xml file
<Match>
<Source name="~.*?MapperImpl.*" />
</Match>
After that, you can remove all additional configurations in build.gradle
Issues list (to not forget):
- Fix "afterEvaluation" in docs
- Document the correct way of default config files override
- Document why manually set spotbugs.excludeFilter will not work (try to support it?)
- Fix spotbugs exclusions for generated sources (correct lifecycle) for both "exclude" and "excludeSources"
from gradle-quality-plugin.
Thanks a lot for the quick reply! That workaround is fine for us.
It really would be nice if files in the default paths for generated source would be ignored.
I couldn't make that work with the spotbugs exclusions, though, because the
from gradle-quality-plugin.
quality.excludeSources
is the only option for filtering by source location. All other exclusions are relative to source root. Someday it will work again (but not very soon - maybe a few weeks).
If possible, try to generate sources into a special package to be able to exclude an entire package with standard spotbugs exclusions file.
from gradle-quality-plugin.
Related Issues (20)
- Setting Spotbugs exclusion breaks cache HOT 1
- Configuring Spotbugs ReportLevel HOT 7
- Security vulnerability in dom4j HOT 1
- Failure with Gradle 6 HOT 5
- gradle 6: quality plugin breaks build because FindBugs has been removed HOT 2
- Support for Kotlin gradle DSL ? HOT 3
- 4.0.0: Failed to run Gradle SpotBugs Worker HOT 2
- plugin breaks gradle integration in IntelliJ IDEA 2020.1 EAP HOT 3
- build error with: Fatal error during transformation HOT 1
- 4.2.1 seems to break CodeNarc HOT 7
- Combining quality plugin with testsets plugin and build dashboard HOT 6
- Feature request: dependency checks for vulnerabilities HOT 1
- SpotBugs support is broken in Gradle 6.4 HOT 4
- Update CodeNarc to latest version (1.6.1) HOT 2
- Provide configDirectory property for Checkstyle plugin HOT 1
- Reporting enabled property deprecation warning HOT 1
- Update Spotbugs Gradle plugin to 5.0.13 HOT 2
- checkstyleMain task is failing with Gradle 8.0 upgrade HOT 2
- Update Spotbugs Gradle plugin to 5.1.4 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-quality-plugin.