Skip to content
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

Overhauled EOTech Holographics #482

Merged
merged 3 commits into from
Nov 11, 2024

Revert "Merge branch 'next' into optimized-textures"

3460d2f
Select commit
Loading
Failed to load commit list.
Merged

Overhauled EOTech Holographics #482

Revert "Merge branch 'next' into optimized-textures"
3460d2f
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (next) failed Nov 11, 2024 in 1m 2s

CodeScene PR Check

โŒ Code Health Quality Gates: FAILED

Change in average Code Health of affected files: -0.14 (5.91 -> 5.77)

  • Declining Code Health: 9 findings(s) ๐Ÿšฉ
  • Improving Code Health: 17 findings(s) โœ…
  • Affected Hotspots: 8 files(s) ๐Ÿ”ฅ

View detailed results in CodeScene

Details

๐Ÿšฉ Declining Code Health (highest to lowest):

  • Complex Method TileEntities.java: init
  • Low Cohesion CustomArmor.java ๐Ÿ”ฅ
  • Complex Method AnimationModeProcessor.java: onTick
  • Complex Method ItemVest.java: ItemVest.Builder.build ๐Ÿ”ฅ
  • Complex Conditional ClientEventHandler.java: update ๐Ÿ”ฅ
  • Primitive Obsession WeaponRenderer.java ๐Ÿ”ฅ
  • Primitive Obsession Button.java
  • Primitive Obsession SpriteSheetTools.java
  • Constructor Over-Injection QBoxer.java: QBoxer

โœ… Improving Code Health:

  • Overall Code Complexity GUIContainerStation.java
  • Complex Method Electronics.java: createEquipment
  • Large Method Vests.java: createEquipment
  • Large Method Armors.java: createEquipment
  • Complex Conditional AnimationModeProcessor.java: onTick
  • Primitive Obsession AnimationModeProcessor.java
  • Primitive Obsession Panel.java
  • Primitive Obsession AnimationData.java
  • Primitive Obsession GUIContainerStation.java
  • Large Method Backpacks.java: createEquipment
  • Bumpy Road Ahead WeaponReloadAspect.java: getNextMagazine ๐Ÿ”ฅ
  • Bumpy Road Ahead WeaponReloadAspect.java: getNextBestMagazineStack ๐Ÿ”ฅ
  • Large Method TileEntities.java: createTileEntity
  • Overall Code Complexity AnimationModeProcessor.java
  • Code Duplication DebugPositioner.java
  • Overall Code Complexity AnimationGUI.java
  • Overall Code Complexity ModificationGUI.java ๐Ÿ”ฅ

Annotations

Check notice on line 68 in src/main/java/com/paneedah/mwc/equipment/Armors.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โœ… No longer an issue: Large Method

createEquipment is no longer above the threshold for lines of code. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.

Check notice on line 68 in src/main/java/com/paneedah/mwc/equipment/Armors.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โ„น New issue: Large Method

init has 137 lines, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.

Check notice on line 25 in src/main/java/com/paneedah/mwc/equipment/Backpacks.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โœ… No longer an issue: Large Method

createEquipment is no longer above the threshold for lines of code. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.

Check notice on line 25 in src/main/java/com/paneedah/mwc/equipment/Backpacks.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โ„น New issue: Large Method

init has 97 lines, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.

Check notice on line 208 in src/main/java/com/paneedah/mwc/equipment/Electronics.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โœ… No longer an issue: Complex Method

createEquipment is no longer above the threshold for cyclomatic complexity. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 208 in src/main/java/com/paneedah/mwc/equipment/Electronics.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โ„น New issue: Complex Method

init has a cyclomatic complexity of 16, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 233 in src/main/java/com/paneedah/mwc/equipment/Vests.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โœ… No longer an issue: Large Method

createEquipment is no longer above the threshold for lines of code. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.

Check notice on line 233 in src/main/java/com/paneedah/mwc/equipment/Vests.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โ„น New issue: Large Method

init has 163 lines, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.

Check notice on line 1 in src/main/java/com/paneedah/mwc/tileentities/TileEntities.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โ„น Getting worse: Lines of Code in a Single File

The lines of code increases from 1412 to 1899, improve code health by reducing it to 1000. The number of Lines of Code in a single file. More Lines of Code lowers the code health.

Check warning on line 1863 in src/main/java/com/paneedah/mwc/tileentities/TileEntities.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โŒ New issue: Complex Method

init has a cyclomatic complexity of 121, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 1863 in src/main/java/com/paneedah/mwc/tileentities/TileEntities.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โœ… No longer an issue: Large Method

createTileEntity is no longer above the threshold for lines of code

Check notice on line 88 in src/main/java/com/paneedah/mwc/utils/MWCUtil.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โ„น New issue: Complex Method

consumeItemsFromPlayerInventory has a cyclomatic complexity of 9, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 247 in src/main/java/com/paneedah/weaponlib/ClientEventHandler.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โ„น Getting worse: Complex Method

update increases in cyclomatic complexity from 13 to 14, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 247 in src/main/java/com/paneedah/weaponlib/ClientEventHandler.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โŒ Getting worse: Complex Conditional

update increases from 1 complex conditionals with 3 branches to 1 complex conditionals with 4 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.

Check notice on line 1 in src/main/java/com/paneedah/weaponlib/ClientEventHandler.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โ„น Getting worse: Overall Code Complexity

The mean cyclomatic complexity increases from 5.14 to 5.45, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.

Check warning on line 1 in src/main/java/com/paneedah/weaponlib/CustomArmor.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โŒ New issue: Low Cohesion

This module has at least 4 different responsibilities amongst its 59 functions, threshold = 3. Cohesion is calculated using the LCOM4 metric. Low cohesion means that the module/class has multiple unrelated responsibilities, doing too many things and breaking the Single Responsibility Principle.

Check warning on line 236 in src/main/java/com/paneedah/weaponlib/ItemVest.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โŒ Getting worse: Complex Method

ItemVest.Builder.build increases in cyclomatic complexity from 10 to 12, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 1 in src/main/java/com/paneedah/weaponlib/Weapon.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โ„น Getting worse: Lines of Code in a Single File

The lines of code increases from 1053 to 1104, improve code health by reducing it to 1000. The number of Lines of Code in a single file. More Lines of Code lowers the code health.

Check notice on line 1 in src/main/java/com/paneedah/weaponlib/Weapon.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โ„น Getting worse: Number of Functions in a Single Module

The number of functions increases from 188 to 205, threshold = 75. This file contains too many functions. Beyond a certain threshold, more functions lower the code health.

Check notice on line 539 in src/main/java/com/paneedah/weaponlib/WeaponReloadAspect.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โ„น Getting worse: Complex Method

getNextMagazine increases in cyclomatic complexity from 17 to 18, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 539 in src/main/java/com/paneedah/weaponlib/WeaponReloadAspect.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โœ… Getting better: Bumpy Road Ahead

getNextMagazine decreases from 3 to 2 logical blocks with deeply nested code, threshold is one single block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check notice on line 597 in src/main/java/com/paneedah/weaponlib/WeaponReloadAspect.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โœ… Getting better: Bumpy Road Ahead

getNextBestMagazineStack decreases from 3 to 2 logical blocks with deeply nested code, threshold is one single block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check notice on line 1 in src/main/java/com/paneedah/weaponlib/WeaponRenderer.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โ„น Getting worse: Lines of Code in a Single File

The lines of code increases from 3015 to 3072, improve code health by reducing it to 1000. The number of Lines of Code in a single file. More Lines of Code lowers the code health.

Check notice on line 1 in src/main/java/com/paneedah/weaponlib/WeaponRenderer.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โ„น Getting worse: Number of Functions in a Single Module

The number of functions increases from 224 to 242, threshold = 75. This file contains too many functions. Beyond a certain threshold, more functions lower the code health.

Check warning on line 1 in src/main/java/com/paneedah/weaponlib/WeaponRenderer.java

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (next)

โŒ New issue: Primitive Obsession

In this module, 30.9% of all function arguments are primitive types, threshold = 30.0%. The functions in this file have too many primitive types (e.g. int, double, float) in their function argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more primitive arguments.