[
https://issues.apache.org/jira/browse/NIFI-14890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Stieglitz updated NIFI-14890:
------------------------------------
Summary: Update the Maven PMD Maven plugin used by the nifi-api to use the
same ruleset as Apache NIFI (was: Update Maven PMD Maven plugin to use the
same ruleset as Apache NIFI)
> Update the Maven PMD Maven plugin used by the nifi-api to use the same
> ruleset as Apache NIFI
> ---------------------------------------------------------------------------------------------
>
> Key: NIFI-14890
> URL: https://issues.apache.org/jira/browse/NIFI-14890
> Project: Apache NiFi
> Issue Type: Improvement
> Components: NiFi API
> Reporter: Daniel Stieglitz
> Priority: Minor
>
> Currently the NIFI-API uses the default ruleset which comes packaged with the
> Maven PMD plugin. When running the plugin with the ruleset defined in Apache
> NIFI there are the following warnings:
> {code:java}
> WARNING] PMD Failure:
> org.apache.nifi.components.resource.StandardResourceReferenceFactory:33
> Rule:MissingOverride Priority:3 The method 'createResourceReferences(String,
> ResourceDefinition)' is missing an @Override annotation..
> [WARNING] PMD Failure:
> org.apache.nifi.components.resource.StandardResourceReferenceFactory:55
> Rule:MissingOverride Priority:3 The method 'createResourceReference(String,
> ResourceDefinition)' is missing an @Override annotation..
> [WARNING] PMD Failure:
> org.apache.nifi.documentation.xml.XmlDocumentationWriter:404
> Rule:MissingOverride Priority:3 The method
> 'writeMultiProcessorUseCases(List<MultiProcessorUseCase>)' is missing an
> @Override annotation..
> [WARNING] PMD Failure: org.apache.nifi.flowfile.KeyValidator:123
> Rule:InefficientEmptyStringCheck Priority:3 String.trim().length() == 0 /
> String.trim().isEmpty() is an inefficient way to validate a blank String..
> [WARNING] PMD Failure: org.apache.nifi.flowfile.KeyValidator:130
> Rule:InefficientEmptyStringCheck Priority:3 String.trim().length() == 0 /
> String.trim().isEmpty() is an inefficient way to validate a blank String..
> [WARNING] PMD Failure:
> org.apache.nifi.processor.exception.TerminatedTaskException:34
> Rule:UnnecessaryConstructor Priority:3 Avoid unnecessary constructors - the
> compiler will generate these for you.
> [WARNING] PMD Failure:
> org/apache/nifi/processor/util/StandardValidators.java:227
> Rule:InefficientEmptyStringCheck Priority:3 String.trim().length() == 0 /
> String.trim().isEmpty() is an inefficient way to validate a blank String..
> [WARNING] PMD Failure: org.apache.nifi.processor.util.StandardValidators:429
> Rule:InefficientEmptyStringCheck Priority:3 String.trim().length() == 0 /
> String.trim().isEmpty() is an inefficient way to validate a blank String..
> [WARNING] PMD Failure:
> org.apache.nifi.processor.util.DirectoryExistsValidator:942
> Rule:InefficientEmptyStringCheck Priority:3 String.trim().length() == 0 /
> String.trim().isEmpty() is an inefficient way to validate a blank String..
> [WARNING] PMD Failure:
> org.apache.nifi.processor.util.DirectoryExistsValidator:942
> Rule:InefficientEmptyStringCheck Priority:3 String.trim().length() == 0 /
> String.trim().isEmpty() is an inefficient way to validate a blank String..
> [WARNING] PMD Failure: org.apache.nifi.registry.Builder:119
> Rule:InefficientEmptyStringCheck Priority:3 String.trim().length() == 0 /
> String.trim().isEmpty() is an inefficient way to validate a blank String..
> [WARNING] PMD Failure: org.apache.nifi.time.DurationFormat:143
> Rule:UnnecessaryVarargsArrayCreation Priority:3 Unnecessary explicit array
> creation for varargs method call.
> [WARNING] PMD Failure: org.apache.nifi.time.DurationFormat:151
> Rule:UnnecessaryVarargsArrayCreation Priority:3 Unnecessary explicit array
> creation for varargs method call.{code}
> This ticket addresses the upgrade to use the same PMD ruleset as Apache NIFI
> does although with some changes (as certain classes are excluded in one rule
> specific to the NIFI codebase).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)