Refactor PhonemeTable as to make it maintainable #56
Annotations
10 errors and 12 warnings
The local variable name 'IPA' doesn't match '[a-z][a-zA-Z0-9]*':
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/App.java#L66
Configurable naming conventions for local variable declarations and other locally-scoped
variables. This rule reports variable declarations which do not match the regex that applies to their
specific kind (e.g. final variable, or catch-clause parameter). Each regex can be configured through
properties.
By default this rule uses the standard Java naming convention (Camel case).
LocalVariableNamingConventions (Priority: 1, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_codestyle.html#localvariablenamingconventions
|
The local variable name 'IPAFile' doesn't match '[a-z][a-zA-Z0-9]*':
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/App.java#L68
Configurable naming conventions for local variable declarations and other locally-scoped
variables. This rule reports variable declarations which do not match the regex that applies to their
specific kind (e.g. final variable, or catch-clause parameter). Each regex can be configured through
properties.
By default this rule uses the standard Java naming convention (Camel case).
LocalVariableNamingConventions (Priority: 1, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_codestyle.html#localvariablenamingconventions
|
Logger calls should be surrounded by log level guards.:
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/App.java#L113
Whenever using a log level, one should check if it is actually enabled, or
otherwise skip the associate String creation and manipulation, as well as any method calls.
An alternative to checking the log level are substituting parameters, formatters or lazy logging
with lambdas. The available alternatives depend on the actual logging framework.
GuardLogStatement (Priority: 2, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_bestpractices.html#guardlogstatement
|
Logger calls should be surrounded by log level guards.:
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/LoadingScreen.java#L40
Whenever using a log level, one should check if it is actually enabled, or
otherwise skip the associate String creation and manipulation, as well as any method calls.
An alternative to checking the log level are substituting parameters, formatters or lazy logging
with lambdas. The available alternatives depend on the actual logging framework.
GuardLogStatement (Priority: 2, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_bestpractices.html#guardlogstatement
|
Logger calls should be surrounded by log level guards.:
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/LoadingScreen.java#L60
Whenever using a log level, one should check if it is actually enabled, or
otherwise skip the associate String creation and manipulation, as well as any method calls.
An alternative to checking the log level are substituting parameters, formatters or lazy logging
with lambdas. The available alternatives depend on the actual logging framework.
GuardLogStatement (Priority: 2, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_bestpractices.html#guardlogstatement
|
Logger calls should be surrounded by log level guards.:
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/gui/scenes/file/AddLangPage.java#L46
Whenever using a log level, one should check if it is actually enabled, or
otherwise skip the associate String creation and manipulation, as well as any method calls.
An alternative to checking the log level are substituting parameters, formatters or lazy logging
with lambdas. The available alternatives depend on the actual logging framework.
GuardLogStatement (Priority: 2, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_bestpractices.html#guardlogstatement
|
Logger calls should be surrounded by log level guards.:
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/gui/scenes/file/OpenLangPage.java#L57
Whenever using a log level, one should check if it is actually enabled, or
otherwise skip the associate String creation and manipulation, as well as any method calls.
An alternative to checking the log level are substituting parameters, formatters or lazy logging
with lambdas. The available alternatives depend on the actual logging framework.
GuardLogStatement (Priority: 2, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_bestpractices.html#guardlogstatement
|
Logger calls should be surrounded by log level guards.:
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/gui/scenes/file/OpenLangPage.java#L60
Whenever using a log level, one should check if it is actually enabled, or
otherwise skip the associate String creation and manipulation, as well as any method calls.
An alternative to checking the log level are substituting parameters, formatters or lazy logging
with lambdas. The available alternatives depend on the actual logging framework.
GuardLogStatement (Priority: 2, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_bestpractices.html#guardlogstatement
|
Logger calls should be surrounded by log level guards.:
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/gui/scenes/file/OpenLangPage.java#L117
Whenever using a log level, one should check if it is actually enabled, or
otherwise skip the associate String creation and manipulation, as well as any method calls.
An alternative to checking the log level are substituting parameters, formatters or lazy logging
with lambdas. The available alternatives depend on the actual logging framework.
GuardLogStatement (Priority: 2, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_bestpractices.html#guardlogstatement
|
Logger calls should be surrounded by log level guards.:
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/gui/scenes/file/OpenLangPage.java#L156
Whenever using a log level, one should check if it is actually enabled, or
otherwise skip the associate String creation and manipulation, as well as any method calls.
An alternative to checking the log level are substituting parameters, formatters or lazy logging
with lambdas. The available alternatives depend on the actual logging framework.
GuardLogStatement (Priority: 2, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_bestpractices.html#guardlogstatement
|
Deprecation notice: v1, v2, and v3 of the artifact actions
The following artifacts were uploaded using a version of actions/upload-artifact that is scheduled for deprecation: "PMD Report".
Please update your workflow to use v4 of the artifact actions.
Learn more: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/
|
pmd-code-scan
The following actions use a deprecated Node.js version and will be forced to run on node20: pmd/pmd-github-action@d57c0463ebba262a33d1983a5c6ac6031bfde43b. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
Avoid using implementation types like 'ArrayList'; use the interface instead:
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/App.java#L48
Excessive coupling to implementation types (e.g., `HashSet`) limits your ability to use alternate
implementations in the future as requirements change. Whenever available, declare variables
and parameters using a more general type (e.g, `Set`).
This rule reports uses of concrete collection types. User-defined types that should be treated
the same as interfaces can be configured with the property `allowedTypes`.
LooseCoupling (Priority: 3, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_bestpractices.html#loosecoupling
|
Avoid using implementation types like 'ArrayList'; use the interface instead:
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/App.java#L146
Excessive coupling to implementation types (e.g., `HashSet`) limits your ability to use alternate
implementations in the future as requirements change. Whenever available, declare variables
and parameters using a more general type (e.g, `Set`).
This rule reports uses of concrete collection types. User-defined types that should be treated
the same as interfaces can be configured with the property `allowedTypes`.
LooseCoupling (Priority: 3, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_bestpractices.html#loosecoupling
|
This for loop can be replaced by a foreach loop:
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/App.java#L171
Reports loops that can be safely replaced with the foreach syntax. The rule considers loops over
lists, arrays and iterators. A loop is safe to replace if it only uses the index variable to
access an element of the list or array, only has one update statement, and loops through *every*
element of the list or array left to right.
ForLoopCanBeForeach (Priority: 3, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_bestpractices.html#forloopcanbeforeach
|
This for loop can be replaced by a foreach loop:
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/App.java#L193
Reports loops that can be safely replaced with the foreach syntax. The rule considers loops over
lists, arrays and iterators. A loop is safe to replace if it only uses the index variable to
access an element of the list or array, only has one update statement, and loops through *every*
element of the list or array left to right.
ForLoopCanBeForeach (Priority: 3, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_bestpractices.html#forloopcanbeforeach
|
This utility class has a non-private constructor:
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/Launcher.java#L8
For classes that only have static methods, consider making them utility classes.
Note that this doesn't apply to abstract classes, since their subclasses may
well include non-static methods. Also, if you want this class to be a utility class,
remember to add a private constructor to prevent instantiation.
(Note, that this use was known before PMD 5.1.0 as UseSingleton).
UseUtilityClass (Priority: 3, Ruleset: Design)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_design.html#useutilityclass
|
Unused import 'net.oijon.susquehanna.gui.toolboxes.Toolbox':
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/gui/components/BinderTab.java#L13
Reports import statements that can be removed. They are either unused,
duplicated, or the members they import are already implicitly in scope,
because they're in java.lang, or the current package.
If some imports cannot be resolved, for instance because you run PMD with
an incomplete auxiliary classpath, some imports may be conservatively marked
as used even if they're not to avoid false positives.
UnnecessaryImport (Priority: 4, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_codestyle.html#unnecessaryimport
|
Avoid using implementation types like 'ArrayList'; use the interface instead:
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/gui/components/BinderTab.java#L34
Excessive coupling to implementation types (e.g., `HashSet`) limits your ability to use alternate
implementations in the future as requirements change. Whenever available, declare variables
and parameters using a more general type (e.g, `Set`).
This rule reports uses of concrete collection types. User-defined types that should be treated
the same as interfaces can be configured with the property `allowedTypes`.
LooseCoupling (Priority: 3, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_bestpractices.html#loosecoupling
|
This for loop can be replaced by a foreach loop:
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/gui/components/BinderTab.java#L35
Reports loops that can be safely replaced with the foreach syntax. The rule considers loops over
lists, arrays and iterators. A loop is safe to replace if it only uses the index variable to
access an element of the list or array, only has one update statement, and loops through *every*
element of the list or array left to right.
ForLoopCanBeForeach (Priority: 3, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_bestpractices.html#forloopcanbeforeach
|
This for loop can be replaced by a foreach loop:
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/gui/components/OrthoList.java#L108
Reports loops that can be safely replaced with the foreach syntax. The rule considers loops over
lists, arrays and iterators. A loop is safe to replace if it only uses the index variable to
access an element of the list or array, only has one update statement, and loops through *every*
element of the list or array left to right.
ForLoopCanBeForeach (Priority: 3, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_bestpractices.html#forloopcanbeforeach
|
Avoid unused method parameters such as 'pt'.:
file:///home/runner/work/Susquehanna/Susquehanna/src/main/java/net/oijon/susquehanna/gui/components/PhonemeEditPopup.java#L33
Reports parameters of methods and constructors that are not referenced them in the method body.
Parameters whose name starts with `ignored` or `unused` are filtered out.
Removing unused formal parameters from public methods could cause a ripple effect through the code base.
Hence, by default, this rule only considers private methods. To include non-private methods, set the
`checkAll` property to `true`.
UnusedFormalParameter (Priority: 3, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.5.0/pmd_rules_java_bestpractices.html#unusedformalparameter
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
PMD Report
|
98.7 KB |
|