Giter VIP home page Giter VIP logo

Comments (10)

xvik avatar xvik commented on September 27, 2024 1

@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.

xvik avatar xvik commented on September 27, 2024 1

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.

DaddyMoe avatar DaddyMoe commented on September 27, 2024

+1

from gradle-quality-plugin.

xvik avatar xvik commented on September 27, 2024

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.

baev avatar baev commented on September 27, 2024

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.

xvik avatar xvik commented on September 27, 2024

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.

eatdrinksleepcode avatar eatdrinksleepcode commented on September 27, 2024

@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.

psdmca avatar psdmca commented on September 27, 2024

+1

from gradle-quality-plugin.

jjathman avatar jjathman commented on September 27, 2024

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.

xvik avatar xvik commented on September 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.