Comments (10)
@eatdrinksleepcode If it was my implementation (like animalsniffer plugin) I would already fix that. But I'm using gradle's pmd plugin and there is simply no way to modify ant task call.
All we have is an official extension for pmd plugin configuration and so we have to wait when gradle team add new option there.
from gradle-quality-plugin.
Finally have time to look at it. The original issue (pmd warnings) was completely solved by new pmd plugin version: gradle now applies explicit -nocache parameter when incremental compilation is not enabled and so warning should never appear anymore (no matter if incremental support enabled or not).
As promised, I only added new pmd configuration shortcut in quality closure:
quality {
pmdIncremental = true
}
Disabled by default.
from gradle-quality-plugin.
+1
from gradle-quality-plugin.
I can't do anything with it, sorry. We can only wait for an official fix (return of the reverted pmd dsl extension).
PS don't know why but I'm getting hundreds of lines with such warning per module
This is odd: you should see only one message per module. Can't imagine any case when this could happen. If you have some simple project with such behaviour please share with me and I will look.
from gradle-quality-plugin.
If you have some simple project with such behaviour please share with me and I will look.
https://github.com/baev/gradle-quality-plugin-issue10
from gradle-quality-plugin.
Thank you for the sample project!
The issue indeed exists, but it's again related to pmd.. almost :)
By default, when we have single source dir (src/main/java) it's passed as dir to pmd ant task and so we see just one warning.
If we add another directory (like generated dir in your case) then gradle will set sources into ant task as separate files. Now the interesting part, pmd ant task is called just once, but internally it runs pmd for each source file and, of course, show the warning each time.
I could look to regroup FileTree (to make conversion from gradle FileTree into ant FileSet smarter), but it will become completely useless as soon as gradle introduce new pmd flag and hide warnings... so I think it's better to simply wait for a new flag
from gradle-quality-plugin.
@xvik so adding an addtionalArguments
or similar property to allow me to pass arbitrary command line arguments to PMD is not an option? This is a familiar pattern that many tools use when wrapping other tools, precisely to allow users flexibility to deal with mismatches between the two tools.
from gradle-quality-plugin.
+1
from gradle-quality-plugin.
It looks like the latest Gradle release (5.6) has support for PMD incremental analysis now. Is this possible to fix now?
https://docs.gradle.org/current/release-notes.html#support-for-pmd-incremental-analysis
from gradle-quality-plugin.
Great, thank you! That means that everyone could remove this warning even now by applying pmd configuration directly.
In the next version, I will mirror this configuration as quality.enablePmdIncrementalAnalysis
(or something like this) to simplify configuration.
I don't think that this option should be enabled by default. I assume there might be issues with gradle's own incremental compilation (which was the reson why initial support was rolled back). But if anyone could assure that it is safe to enable it by default please tell me.
from gradle-quality-plugin.
Related Issues (20)
- Setting Spotbugs exclusion breaks cache HOT 1
- A problem occurred configuring project ':lib': TasksListenerService$Inject HOT 3
- 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
- Cannot suppress SpotBug warnings in generated code HOT 3
- 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.