Deprecation Message: The option skipLexicalErrors is deprecated. Use failOnError instead.
vector-jnajjar opened this issue · 6 comments
The newest version of CPD (from PMD 7.3.0) deprecated this option.
It is read from in de.aaschmid.gradle.plugins.cpd.CpdExtension#skipLexicalErrors
and written from the taskMapping in com.vector.cfg.build.cfgpmd.cpd.CfgCpdPlugin#setupTaskDefaults
Could you please update this to failOnError.
See https://github.com/pmd/pmd/blob/master/docs/pages/release_notes_old.md#deprecated-api for details.
Thanks. Do you have a clue how the already existing option ignoreFailures
from Gradle itself acts in that regard, or can you try it?
Edit: also I am currently not sure if this is also a behavioral change as skip lexical errors has only skipped parsing errors and now all errors are considered ...
VerificationTask.ignoreFailures
is not a replacement, as this would not fail the build anymore on duplicated code.
But as far as I understood failOnError
does the same with!
Hi Andreas,
https://docs.pmd-code.org/apidocs/pmd-core/7.3.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#setSkipLexicalErrors(boolean) states that the new flag also configures whether lexical errors should fail the build or not.
I feel like there is a difference between fail-on-error and fail-on-violation.
Ok, I will try to add this option within the next days (PR also welcome) if I find the time...
I now played around 1 hour with failOnError
and failOnViolation
but don't get their actual behaviors such that I will skip the corresponding tests for now and will create the new release.
Maybe I overlook something, or I miss the forest for the trees but I neither have the time nor the muse for diving deeper...
However, both parameters are now available and can be forwarded ...