-
Notifications
You must be signed in to change notification settings - Fork 4
integrade pmd and fix level 1 of errors #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,10 +30,9 @@ public class SummaryUtil { | |
|
||
private static boolean isSummaryInputOutputJsonSerializationEnabled; | ||
|
||
private boolean isJsonSerializationEnabled; | ||
|
||
@Deprecated(forRemoval = true) | ||
public void init() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I’m having trouble understanding the purpose of this class — most of its code seems to be unreachable, and all the booleans are private and unused. Does anyone happen to remember what the original intention behind this class was, or where it might have been copied from? f4d77a5#diff-cece0d808b9662b571949c1de8b7f123b0f6da6dcea16ac0c46e95a2868cb744 |
||
isSummaryInputOutputJsonSerializationEnabled = isJsonSerializationEnabled; | ||
// noop | ||
} | ||
|
||
/** | ||
|
KonstantinVoytovich-sm marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="Conductor Java SDK Custom Rules" | ||
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd"> | ||
|
||
<description> | ||
Custom PMD ruleset for Conductor Java SDK project. | ||
Inherits errorprone and bestpractices rulesets. | ||
</description> | ||
|
||
<!-- Inherit the two specified rulesets --> | ||
<rule ref="category/java/errorprone.xml"> | ||
</rule> | ||
|
||
<rule ref="category/java/bestpractices.xml"> | ||
</rule> | ||
|
||
<!-- Exclude generated code and build artifacts --> | ||
<exclude-pattern>.*/generated/.*</exclude-pattern> | ||
<exclude-pattern>.*/build/.*</exclude-pattern> | ||
<exclude-pattern>.*/target/.*</exclude-pattern> | ||
<exclude-pattern>.*/bin/.*</exclude-pattern> | ||
<exclude-pattern>.*/out/.*</exclude-pattern> | ||
|
||
</ruleset> |
KonstantinVoytovich-sm marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<FindBugsFilter | ||
xmlns="https://github.com/spotbugs/filter/3.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd"> | ||
|
||
<Match> | ||
<!-- It is all over the codebase. Skipping for now. TODO: investigate each usage later and fix if possible. --> | ||
<Bug pattern="DM_DEFAULT_ENCODING"/> | ||
</Match> | ||
|
||
<Match> | ||
<!-- TDOO: I don't see usages of this class in the codebase. But it is public class. Get back to this later and try to understand what was the intention behind it. --> | ||
<Bug pattern="WEAK_MESSAGE_DIGEST_MD5"/> | ||
<Class name="com.netflix.conductor.common.utils.MetadataUtils"/> | ||
<Method name="computeChecksum" /> | ||
</Match> | ||
|
||
<Match> | ||
<!-- Shouldn't cause any issues. Skipping for now. TODO: fix this code smell later. --> | ||
<Bug pattern="NP_NULL_PARAM_DEREF_NONVIRTUAL"/> | ||
<Class name="com.netflix.conductor.client.spring.SpringWorkerConfiguration"/> | ||
<Method name="getDomain"/> | ||
</Match> | ||
|
||
</FindBugsFilter> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope later to increase it to at least 3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also plan to add it to PR pipelines later. Together with spotlessCheck