-
Notifications
You must be signed in to change notification settings - Fork 225
Open
Description
Code Smells Issues
During an analysis of the project code with PMD, a series of code smells were identified that can be addressed to enhance the code quality.
Ruleset
For detecting code smells in the project, the team focused on the following code smells as indicated by the professor:
- Excessive Parameter List
- Excessive Class Length
- Excessive Method Length
- God Class
- Data Class
XML
<?xml version="1.0"?>
<ruleset name="Custom ruleset"
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>
<http://pmd.sourceforge.net/ruleset_2_0_0.xsd>">
<description>
This ruleset checks my code for bad stuff.
</description>
<rule ref="category/java/design.xml/ExcessiveParameterList">
<properties>
<property name="minimum" value="4" />
</properties>
</rule>
<rule ref="category/java/design.xml/ExcessiveClassLength">
<properties>
<property name="minimum" value="100" />
</properties>
</rule>
<rule ref="category/java/design.xml/ExcessiveMethodLength">
<properties>
<property name="minimum" value="20" />
</properties>
</rule>
<rule ref="category/java/design.xml/GodClass" />
<rule ref="category/java/design.xml/DataClass" />
</ruleset>Results
Solution
For this issue, I propose resolving the ExcessiveClassLength and duplicatedCode in some classes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels