Skip to content

Overall refactor

Overall refactor #14

Triggered via pull request September 22, 2024 22:03
Status Success
Total duration 3m 19s
Artifacts

qodana_code_quality.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

435 warnings
'public' method with 'boolean' parameter: lwjgl3/src/main/java/io/github/alxtray/groundclimber/lwjgl3/StartupHelper.java#L67
'public' method `startNewJvmIfRequired()` with 'boolean' parameter
Numeric cast that loses precision: core/src/main/java/io/github/alxtray/groundclimber/renderers/PlayerRenderer.java#L33
Cast from 'double' to `float` may result in loss of precision
Class too deep in inheritance tree: core/src/main/java/io/github/alxtray/groundclimber/bodies/NormalPlatform.java#L5
`NormalPlatform` is too deep in inheritance tree (inheritance depth = 3)
Class too deep in inheritance tree: core/src/main/java/io/github/alxtray/groundclimber/bodies/CrackedPlatform.java#L8
`CrackedPlatform` is too deep in inheritance tree (inheritance depth = 3)
Class with only 'private' constructors should be declared 'final': lwjgl3/src/main/java/io/github/alxtray/groundclimber/lwjgl3/StartupHelper.java#L37
Class `StartupHelper` with only 'private' constructors should be declared 'final'
Class with only 'private' constructors should be declared 'final': core/src/main/java/io/github/alxtray/groundclimber/utilities/AssetLibrary.java#L13
Class `AssetLibrary` with only 'private' constructors should be declared 'final'
Overly complex method: lwjgl3/src/main/java/io/github/alxtray/groundclimber/lwjgl3/StartupHelper.java#L67
Overly complex method `startNewJvmIfRequired()` (cyclomatic complexity = 12)
Overly complex method: core/src/main/java/io/github/alxtray/groundclimber/renderers/EnvironmentObjectRenderer.java#L39
Overly complex method `selectTileTexture()` (cyclomatic complexity = 16)
Nullability and data flow problems: core/src/main/java/io/github/alxtray/groundclimber/listeners/CrackedPlatformContactListener.java#L38
Method invocation `incrementCrackLevel` may produce `NullPointerException`
Nullability and data flow problems: core/src/main/java/io/github/alxtray/groundclimber/listeners/CrackedPlatformContactListener.java#L35
Casting `bodyAUserData` to `CrackedPlatform` may produce `ClassCastException`
Feature envy: core/src/main/java/io/github/alxtray/groundclimber/screens/GameScreen.java#L63
Class 'ControllerManager' accessed repeatedly in method `render()`
Feature envy: core/src/main/java/io/github/alxtray/groundclimber/screens/GameScreen.java#L105
Class 'Player' accessed repeatedly in method `checkPlayerInBounds()`
Feature envy: core/src/main/java/io/github/alxtray/groundclimber/controllers/PhysicsController.java#L31
Class 'PlatformData' accessed repeatedly in method `PhysicsController()`
Feature envy: core/src/main/java/io/github/alxtray/groundclimber/screens/MainMenuScreen.java#L23
Class 'ButtonBuilder' accessed repeatedly in method `MainMenuScreen()`
Feature envy: core/src/main/java/io/github/alxtray/groundclimber/renderers/RenderManager.java#L40
Class 'Player' accessed repeatedly in method `drawDebugInfo()`
Feature envy: core/src/main/java/io/github/alxtray/groundclimber/controllers/ControllerManager.java#L28
Class 'PlayerController' accessed repeatedly in method `update()`
Feature envy: core/src/main/java/io/github/alxtray/groundclimber/screens/GameScreen.java#L32
Class 'AssetLibrary' accessed repeatedly in method `GameScreen()`
Feature envy: core/src/main/java/io/github/alxtray/groundclimber/screens/MainMenuScreen.java#L61
Class 'Logger' accessed repeatedly in method `render()`
Feature envy: core/src/main/java/io/github/alxtray/groundclimber/controllers/ControllerManager.java#L28
Class 'PhysicsController' accessed repeatedly in method `update()`
Feature envy: core/src/main/java/io/github/alxtray/groundclimber/renderers/PlayerRenderer.java#L12
Class 'AssetLibrary' accessed repeatedly in method `PlayerRenderer()`
Feature envy: core/src/main/java/io/github/alxtray/groundclimber/renderers/PlayerRenderer.java#L18
Class 'Player' accessed repeatedly in method `render()`
Feature envy: core/src/main/java/io/github/alxtray/groundclimber/screens/MenuScreen.java#L39
Class 'AssetLibrary' accessed repeatedly in method `MenuScreen()`
Feature envy: core/src/main/java/io/github/alxtray/groundclimber/screens/GameScreen.java#L32
Class 'Logger' accessed repeatedly in method `GameScreen()`
Feature envy: core/src/main/java/io/github/alxtray/groundclimber/Core.java#L17
Class 'AssetLibrary' accessed repeatedly in method `create()`
Feature envy: core/src/main/java/io/github/alxtray/groundclimber/screens/LevelSelectScreen.java#L28
Class 'ButtonBuilder' accessed repeatedly in method `LevelSelectScreen()`
Feature envy: core/src/main/java/io/github/alxtray/groundclimber/renderers/EnvironmentObjectRenderer.java#L16
Class 'Platform' accessed repeatedly in method `visitPlatform()`
Feature envy: core/src/main/java/io/github/alxtray/groundclimber/controllers/ControllerManager.java#L20
Class 'LevelData' accessed repeatedly in method `ControllerManager()`
Class with too many fields: core/src/main/java/io/github/alxtray/groundclimber/screens/MenuScreen.java#L17
`MenuScreen` has too many fields (field count = 15)
Inconsistent line separators: gradlew.bat#L1
Line separators in the current file (\\r\\n) differ from the project defaults (\\n)
Line is longer than allowed by code style: README.md#L9
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L111
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L93
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L149
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L139
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: README.md#L4
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: .github/workflows/gradle.yml#L5
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L152
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: lwjgl3/build.gradle#L97
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: README.md#L10
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: html/build.gradle#L41
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L135
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L110
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L96
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: core/src/main/java/io/github/alxtray/groundclimber/Core.gwt.xml#L2
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L120
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: README.md#L35
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: README.md#L42
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L97
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: lwjgl3/build.gradle#L85
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L161
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: .github/workflows/gradle.yml#L6
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L150
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L160
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: android/build.gradle#L120
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: .github/workflows/qodana_code_quality.yml#L20
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: lwjgl3/build.gradle#L89
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: html/webapp/index.html#L11
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: README.md#L36
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: lwjgl3/build.gradle#L105
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L133
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: html/build.gradle#L15
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L103
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L153
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L104
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: gradlew#L60
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: .github/workflows/gradle.yml#L39
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: gradlew.bat#L77
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L98
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L100
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L99
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: .github/workflows/gradle.yml#L40
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: flake.lock#L10
Line is longer than allowed by code style (\> 120 columns)
Line is longer than allowed by code style: assets/ui/skin.json#L101
Line is longer than allowed by code style (\> 120 columns)
Overly long method: lwjgl3/src/main/java/io/github/alxtray/groundclimber/lwjgl3/StartupHelper.java#L67
`startNewJvmIfRequired` is too long (# Non-comment source statements = 46)
Parameter name differs from parameter in overridden or overloaded method: core/src/main/java/io/github/alxtray/groundclimber/listeners/ContactListenerImpl.java#L44
Parameter name `contactImpulse` is different from parameter 'impulse' in the super method
Method with too many parameters: core/src/main/java/io/github/alxtray/groundclimber/utilities/PlatformFactory.java#L13
`createPlatform()` has too many parameters (num parameters = 6)
Problematic whitespace: flake.nix#L0
File 'flake.nix' uses tabs for indentation
Problematic whitespace: assets/ui/skin.json#L0
File 'skin.json' uses tabs for indentation
Problematic whitespace: android/build.gradle#L0
File 'build.gradle' uses tabs for indentation
Use of 'System.out' or 'System.err': lwjgl3/src/main/java/io/github/alxtray/groundclimber/lwjgl3/StartupHelper.java#L109
Uses of `System.err` should probably be replaced with more robust logging
Use of 'System.out' or 'System.err': lwjgl3/src/main/java/io/github/alxtray/groundclimber/lwjgl3/StartupHelper.java#L126
Uses of `System.err` should probably be replaced with more robust logging
Use of 'System.out' or 'System.err': lwjgl3/src/main/java/io/github/alxtray/groundclimber/lwjgl3/StartupHelper.java#L144
Uses of `System.out` should probably be replaced with more robust logging
Use of 'System.out' or 'System.err': lwjgl3/src/main/java/io/github/alxtray/groundclimber/lwjgl3/StartupHelper.java#L95
Uses of `System.err` should probably be replaced with more robust logging
Use of 'System.out' or 'System.err': lwjgl3/src/main/java/io/github/alxtray/groundclimber/lwjgl3/StartupHelper.java#L150
Uses of `System.err` should probably be replaced with more robust logging
Call to 'printStackTrace()': lwjgl3/src/main/java/io/github/alxtray/groundclimber/lwjgl3/StartupHelper.java#L151
Call to `printStackTrace()` should probably be replaced with more robust logging
Overly broad 'catch' block: lwjgl3/src/main/java/io/github/alxtray/groundclimber/lwjgl3/StartupHelper.java#L149
'catch' of `Exception` is too broad, masking exceptions 'IOException' and 'InterruptedException'
Type may be weakened: core/src/main/java/io/github/alxtray/groundclimber/renderers/BackgroundObjectRenderer.java#L15
Type of parameter `batch` may be weakened to 'com.badlogic.gdx.graphics.g2d.Batch'
Type may be weakened: core/src/main/java/io/github/alxtray/groundclimber/renderers/RenderManager.java#L29
Type of parameter `environmentObjects` may be weakened to 'java.lang.Iterable'
Type may be weakened: core/src/main/java/io/github/alxtray/groundclimber/renderers/PlayerRenderer.java#L18
Type of parameter `batch` may be weakened to 'com.badlogic.gdx.graphics.g2d.Batch'
Type may be weakened: core/src/main/java/io/github/alxtray/groundclimber/controllers/PhysicsController.java#L31
Type of parameter `platformsData` may be weakened to 'java.lang.Iterable'
Type may be weakened: core/src/main/java/io/github/alxtray/groundclimber/renderers/RenderManager.java#L40
Type of parameter `batch` may be weakened to 'com.badlogic.gdx.graphics.g2d.Batch'
Type may be weakened: core/src/main/java/io/github/alxtray/groundclimber/utilities/AssetLibrary.java#L56
Type of parameter `matchingSequence` may be weakened to 'java.lang.CharSequence'
Type may be weakened: core/src/main/java/io/github/alxtray/groundclimber/utilities/AssetLibrary.java#L64
Type of parameter `assetPaths` may be weakened to 'java.lang.Iterable'
Type may be weakened: core/src/main/java/io/github/alxtray/groundclimber/screens/LevelSelectScreen.java#L48
Type of variable `jsonReader` may be weakened to 'com.badlogic.gdx.utils.BaseJsonReader'
qodana
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/