PMD Results

The following document contains the results of PMD 7.17.0.

Violations By Priority

Priority 1

coder - io/github/magwas/coder/FileDeletionService.java

Rule Violation Line
AvoidThrowingRawExceptionTypes Avoid throwing raw exception type RuntimeException. 17

coder - io/github/magwas/coder/FileWriterService.java

Rule Violation Line
AvoidThrowingRawExceptionTypes Avoid throwing raw exception type RuntimeException. 19

coder - io/github/magwas/coder/LineReaderDependency.java

Rule Violation Line
AvoidThrowingRawExceptionTypes Avoid throwing raw exception type RuntimeException. 20

coder - io/github/magwas/coder/XMLFileWriterService.java

Rule Violation Line
AvoidThrowingRawExceptionTypes Avoid throwing raw exception type RuntimeException. 49

coder - io/github/magwas/coder/tests/OpenRouterClientServiceStub.java

Rule Violation Line
AvoidThrowingRawExceptionTypes Avoid throwing raw exception type RuntimeException. 15

coder - io/github/magwas/coder/tests/TestUtil.java

Rule Violation Line
AvoidThrowingRawExceptionTypes Avoid throwing raw exception type RuntimeException. 21

Priority 2

coder - io/github/magwas/coder/SourceCodeReaderService.java

Rule Violation Line
SystemPrintln Usage of System.out/err 65

Priority 3

coder - io/github/magwas/coder/CoderApplication.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 16
MethodArgumentCouldBeFinal Parameter 'args' is not assigned and could be declared final 20
SignatureDeclareThrowsException A method/constructor should not explicitly throw java.lang.Exception 20
CloseResource Ensure that resources like this AnnotationConfigApplicationContext object are closed after use 21

coder - io/github/magwas/coder/ConfigService.java

Rule Violation Line
AutowiredFields @Autowired fields naming conventions 11
AutowiredFields @Autowired fields naming conventions 14
ServiceClassMethods Services have only public apply method 16
SignatureDeclareThrowsException A method/constructor should not explicitly throw java.lang.Exception 16
ServiceClassMethods Services have only public apply method 20

coder - io/github/magwas/coder/ConsoleInputService.java

Rule Violation Line
MethodArgumentCouldBeFinal Parameter 'lineReader' is not assigned and could be declared final 10
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 21

coder - io/github/magwas/coder/DirectoryComponent.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 9

coder - io/github/magwas/coder/ErrorMessages.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3

coder - io/github/magwas/coder/FileDeletionService.java

Rule Violation Line
MethodArgumentCouldBeFinal Parameter 'fileName' is not assigned and could be declared final 11

coder - io/github/magwas/coder/FileService.java

Rule Violation Line
MethodArgumentCouldBeFinal Parameter 'content' is not assigned and could be declared final 12

coder - io/github/magwas/coder/FileWriterService.java

Rule Violation Line
MethodArgumentCouldBeFinal Parameter 'fileName' is not assigned and could be declared final 12
MethodArgumentCouldBeFinal Parameter 'content' is not assigned and could be declared final 12

coder - io/github/magwas/coder/HttpClientDependency.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 8

coder - io/github/magwas/coder/LineReaderDependency.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 12
CloseResource Ensure that resources like this Terminal object are closed after use 17

coder - io/github/magwas/coder/MainLoopService.java

Rule Violation Line
AutowiredFields @Autowired fields naming conventions 16
AutowiredFields @Autowired fields naming conventions 19
AutowiredFields @Autowired fields naming conventions 22
AutowiredFields @Autowired fields naming conventions 25
AutowiredFields @Autowired fields naming conventions 28
AutowiredFields @Autowired fields naming conventions 31
AutowiredFields @Autowired fields naming conventions 34
AutowiredFields @Autowired fields naming conventions 37
AutowiredFields @Autowired fields naming conventions 40
AutowiredFields @Autowired fields naming conventions 43
AutowiredFields @Autowired fields naming conventions 46
SignatureDeclareThrowsException A method/constructor should not explicitly throw java.lang.Exception 48
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 61

coder - io/github/magwas/coder/ObjectMapperComponent.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 9

coder - io/github/magwas/coder/OpenRouterClientService.java

Rule Violation Line
AutowiredFields @Autowired fields naming conventions 15
AutowiredFields @Autowired fields naming conventions 18
ServiceClassMethods Services have only public apply method 20
MethodArgumentCouldBeFinal Parameter 'requestBody' is not assigned and could be declared final 20
MethodArgumentCouldBeFinal Parameter 'authHeader' is not assigned and could be declared final 20
SignatureDeclareThrowsException A method/constructor should not explicitly throw java.lang.Exception 20

coder - io/github/magwas/coder/OpenRouterRequestService.java

Rule Violation Line
AutowiredFields @Autowired fields naming conventions 11
AutowiredFields @Autowired fields naming conventions 14
MethodArgumentCouldBeFinal Parameter 'personalityName' is not assigned and could be declared final 16
MethodArgumentCouldBeFinal Parameter 'messages' is not assigned and could be declared final 16

coder - io/github/magwas/coder/OpenRouterResponseService.java

Rule Violation Line
AutowiredFields @Autowired fields naming conventions 16
AutowiredFields @Autowired fields naming conventions 19
AutowiredFields @Autowired fields naming conventions 22
MethodArgumentCouldBeFinal Parameter 'responseBody' is not assigned and could be declared final 24
MethodArgumentCouldBeFinal Parameter 'durationMs' is not assigned and could be declared final 24
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 16, but has at least 29 characters appended. 28
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3335
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3640
UnusedLocalVariable Avoid unused local variables such as 'seconds'. 54
MethodArgumentCouldBeFinal Parameter 'processedFiles' is not assigned and could be declared final 65
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 71
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 75

coder - io/github/magwas/coder/PathUtil.java

Rule Violation Line
MethodArgumentCouldBeFinal Parameter 'path' is not assigned and could be declared final 8
MethodArgumentCouldBeFinal Parameter 'currentDir' is not assigned and could be declared final 8

coder - io/github/magwas/coder/PersonalityService.java

Rule Violation Line
AutowiredFields @Autowired fields naming conventions 11
MethodArgumentCouldBeFinal Parameter 'personalityName' is not assigned and could be declared final 13

coder - io/github/magwas/coder/QuestionHandlerService.java

Rule Violation Line
AutowiredFields @Autowired fields naming conventions 15
AutowiredFields @Autowired fields naming conventions 18
AutowiredFields @Autowired fields naming conventions 21
AutowiredFields @Autowired fields naming conventions 24
AutowiredFields @Autowired fields naming conventions 27
AutowiredFields @Autowired fields naming conventions 30
AutowiredFields @Autowired fields naming conventions 33
AutowiredFields @Autowired fields naming conventions 36
AutowiredFields @Autowired fields naming conventions 39
MethodArgumentCouldBeFinal Parameter 'personalityName' is not assigned and could be declared final 41
MethodArgumentCouldBeFinal Parameter 'question' is not assigned and could be declared final 41
AvoidLiteralsInIfCondition Avoid using literals such as 200 in if statements 57
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 64

coder - io/github/magwas/coder/SourceCodeReaderService.java

Rule Violation Line
MethodArgumentCouldBeFinal Parameter 'dir' is not assigned and could be declared final 23
MethodArgumentCouldBeFinal Parameter 'xml' is not assigned and could be declared final 23

coder - io/github/magwas/coder/SystemDependency.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 8

coder - io/github/magwas/coder/SystemExitSimulationException.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3
MethodArgumentCouldBeFinal Parameter 'exitCode' is not assigned and could be declared final 6

coder - io/github/magwas/coder/SystemInstructionsService.java

Rule Violation Line
AutowiredFields @Autowired fields naming conventions 13
MethodArgumentCouldBeFinal Parameter 'personalityName' is not assigned and could be declared final 15
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 2426

coder - io/github/magwas/coder/TimeDependency.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 6

coder - io/github/magwas/coder/XMLFileWriterService.java

Rule Violation Line
AutowiredFields @Autowired fields naming conventions 17
AutowiredFields @Autowired fields naming conventions 20
AutowiredFields @Autowired fields naming conventions 23
MethodArgumentCouldBeFinal Parameter 'xmlContent' is not assigned and could be declared final 25
MethodArgumentCouldBeFinal Parameter 'path' is not assigned and could be declared final 47
MethodArgumentCouldBeFinal Parameter 'currentDir' is not assigned and could be declared final 47

coder - io/github/magwas/coder/XmlProcessingUtil.java

Rule Violation Line
MethodArgumentCouldBeFinal Parameter 'xmlContent' is not assigned and could be declared final 21
MethodArgumentCouldBeFinal Parameter 'xmlContent' is not assigned and could be declared final 33
MethodArgumentCouldBeFinal Parameter 'xmlContent' is not assigned and could be declared final 45

coder - io/github/magwas/coder/XmlUtil.java

Rule Violation Line
MethodArgumentCouldBeFinal Parameter 'content' is not assigned and could be declared final 6

coder - io/github/magwas/coder/config/ApiKeyConfigService.java

Rule Violation Line
AutowiredFields @Autowired fields naming conventions 11

coder - io/github/magwas/coder/config/ConfigLoadService.java

Rule Violation Line
AutowiredFields @Autowired fields naming conventions 18
AutowiredFields @Autowired fields naming conventions 21

coder - io/github/magwas/coder/config/ConfigState.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 6

coder - io/github/magwas/coder/conversation/ConversationAddMessageService.java

Rule Violation Line
AutowiredFields @Autowired fields naming conventions 13
MethodArgumentCouldBeFinal Parameter 'message' is not assigned and could be declared final 15
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 20

coder - io/github/magwas/coder/conversation/ConversationClearService.java

Rule Violation Line
AutowiredFields @Autowired fields naming conventions 11
UseExplicitTypes Use Explicit Types 14

coder - io/github/magwas/coder/conversation/ConversationGetMessagesService.java

Rule Violation Line
AutowiredFields @Autowired fields naming conventions 11

coder - io/github/magwas/coder/conversation/ConversationHasSystemInstructionsService.java

Rule Violation Line
AutowiredFields @Autowired fields naming conventions 9

coder - io/github/magwas/coder/conversation/ConversationSetupService.java

Rule Violation Line
AutowiredFields @Autowired fields naming conventions 17
AutowiredFields @Autowired fields naming conventions 20
AutowiredFields @Autowired fields naming conventions 23
AutowiredFields @Autowired fields naming conventions 26
MethodArgumentCouldBeFinal Parameter 'personalityName' is not assigned and could be declared final 28
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 34
MethodArgumentCouldBeFinal Parameter 'instructions' is not assigned and could be declared final 42
MethodArgumentCouldBeFinal Parameter 'sourceCode' is not assigned and could be declared final 42
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 45
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 47

coder - io/github/magwas/coder/conversation/ConversationSizeService.java

Rule Violation Line
AutowiredFields @Autowired fields naming conventions 9

coder - io/github/magwas/coder/conversation/ConversationStateData.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 7

coder - io/github/magwas/coder/config/tests/ConfigLoadServiceStub.java

Rule Violation Line
ExceptionAsFlowControl Exception thrown at line 16 is caught in this block. 2223
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 22

coder - io/github/magwas/coder/tests/ConsoleInputServiceStub.java

Rule Violation Line
MethodArgumentCouldBeFinal Parameter 'state' is not assigned and could be declared final 21

coder - io/github/magwas/coder/tests/ObjectMapperComponentStub.java

Rule Violation Line
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 22

coder - io/github/magwas/coder/tests/OpenRouterClientServiceStub.java

Rule Violation Line
ExceptionAsFlowControl Exception thrown at line 15 is caught in this block. 2122
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 21

coder - io/github/magwas/coder/tests/OpenRouterClientServiceTest.java

Rule Violation Line
JUnit5TestShouldBePackagePrivate JUnit 5 tests should be package-private. 19
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 32

coder - io/github/magwas/coder/tests/OpenRouterResponseServiceTest.java

Rule Violation Line
JUnit5TestShouldBePackagePrivate JUnit 5 tests should be package-private. 15
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 22
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 35

coder - io/github/magwas/coder/tests/QuestionHandlerServiceTest.java

Rule Violation Line
JUnit5TestShouldBePackagePrivate JUnit 5 tests should be package-private. 20
MissingOverride The method 'setUp()' is missing an @Override annotation. 32

coder - io/github/magwas/coder/tests/SystemDependencyStub.java

Rule Violation Line
MutableStaticState Do not use non-final non-private static fields 12

coder - io/github/magwas/coder/tests/TestUtil.java

Rule Violation Line
MethodArgumentCouldBeFinal Parameter 'target' is not assigned and could be declared final 12
MethodArgumentCouldBeFinal Parameter 'dependencyClass' is not assigned and could be declared final 12
AvoidAccessibilityAlteration You should not modify visibility of constructors, methods or fields using setAccessible() 16

coder - io/github/magwas/coder/tests/XMLFileWriterServiceStub.java

Rule Violation Line
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 17

coder - io/github/magwas/coder/tests/XMLFileWriterServiceTest.java

Rule Violation Line
JUnit5TestShouldBePackagePrivate JUnit 5 tests should be package-private. 17
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 24
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 32
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 40

Priority 4

coder - io/github/magwas/coder/FileWriterService.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ErrorMessages': 'FILE_ERROR' is already in scope because it is inherited by an enclosing type 19

coder - io/github/magwas/coder/OpenRouterRequestService.java

Rule Violation Line
UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 16

coder - io/github/magwas/coder/config/ApiKeyConfigService.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ErrorMessages': 'API_KEY_ERROR' is already in scope because it is inherited by an enclosing type 15

coder - io/github/magwas/coder/tests/QuestionHandlerServiceTest.java

Rule Violation Line
UnnecessaryImport Unused static import 'org.junit.jupiter.api.Assertions.*' 3

coder - io/github/magwas/coder/tests/XMLFileWriterServiceStub.java

Rule Violation Line
UnnecessaryImport Unused static import 'org.mockito.ArgumentMatchers.*' 3

coder - io/github/magwas/coder/tests/XMLFileWriterServiceTest.java

Rule Violation Line
UnnecessaryImport Unused static import 'org.mockito.Mockito.*' 4

coder - io/github/magwas/coder/tests/XmlProcessingUtilStub.java

Rule Violation Line
UnnecessaryImport Unused static import 'org.mockito.Mockito.*' 3

Files

coder - io/github/magwas/coder/CoderApplication.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 16
MethodArgumentCouldBeFinal Parameter 'args' is not assigned and could be declared final 3 20
SignatureDeclareThrowsException A method/constructor should not explicitly throw java.lang.Exception 3 20
CloseResource Ensure that resources like this AnnotationConfigApplicationContext object are closed after use 3 21

coder - io/github/magwas/coder/ConfigService.java

Rule Violation Priority Line
AutowiredFields @Autowired fields naming conventions 3 11
AutowiredFields @Autowired fields naming conventions 3 14
ServiceClassMethods Services have only public apply method 3 16
SignatureDeclareThrowsException A method/constructor should not explicitly throw java.lang.Exception 3 16
ServiceClassMethods Services have only public apply method 3 20

coder - io/github/magwas/coder/ConsoleInputService.java

Rule Violation Priority Line
MethodArgumentCouldBeFinal Parameter 'lineReader' is not assigned and could be declared final 3 10
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 21

coder - io/github/magwas/coder/DirectoryComponent.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 9

coder - io/github/magwas/coder/ErrorMessages.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 3

coder - io/github/magwas/coder/FileDeletionService.java

Rule Violation Priority Line
MethodArgumentCouldBeFinal Parameter 'fileName' is not assigned and could be declared final 3 11
AvoidThrowingRawExceptionTypes Avoid throwing raw exception type RuntimeException. 1 17

coder - io/github/magwas/coder/FileService.java

Rule Violation Priority Line
MethodArgumentCouldBeFinal Parameter 'content' is not assigned and could be declared final 3 12

coder - io/github/magwas/coder/FileWriterService.java

Rule Violation Priority Line
MethodArgumentCouldBeFinal Parameter 'fileName' is not assigned and could be declared final 3 12
MethodArgumentCouldBeFinal Parameter 'content' is not assigned and could be declared final 3 12
AvoidThrowingRawExceptionTypes Avoid throwing raw exception type RuntimeException. 1 19
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ErrorMessages': 'FILE_ERROR' is already in scope because it is inherited by an enclosing type 4 19

coder - io/github/magwas/coder/HttpClientDependency.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 8

coder - io/github/magwas/coder/LineReaderDependency.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 12
CloseResource Ensure that resources like this Terminal object are closed after use 3 17
AvoidThrowingRawExceptionTypes Avoid throwing raw exception type RuntimeException. 1 20

coder - io/github/magwas/coder/MainLoopService.java

Rule Violation Priority Line
AutowiredFields @Autowired fields naming conventions 3 16
AutowiredFields @Autowired fields naming conventions 3 19
AutowiredFields @Autowired fields naming conventions 3 22
AutowiredFields @Autowired fields naming conventions 3 25
AutowiredFields @Autowired fields naming conventions 3 28
AutowiredFields @Autowired fields naming conventions 3 31
AutowiredFields @Autowired fields naming conventions 3 34
AutowiredFields @Autowired fields naming conventions 3 37
AutowiredFields @Autowired fields naming conventions 3 40
AutowiredFields @Autowired fields naming conventions 3 43
AutowiredFields @Autowired fields naming conventions 3 46
SignatureDeclareThrowsException A method/constructor should not explicitly throw java.lang.Exception 3 48
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 61

coder - io/github/magwas/coder/ObjectMapperComponent.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 9

coder - io/github/magwas/coder/OpenRouterClientService.java

Rule Violation Priority Line
AutowiredFields @Autowired fields naming conventions 3 15
AutowiredFields @Autowired fields naming conventions 3 18
ServiceClassMethods Services have only public apply method 3 20
MethodArgumentCouldBeFinal Parameter 'requestBody' is not assigned and could be declared final 3 20
MethodArgumentCouldBeFinal Parameter 'authHeader' is not assigned and could be declared final 3 20
SignatureDeclareThrowsException A method/constructor should not explicitly throw java.lang.Exception 3 20

coder - io/github/magwas/coder/OpenRouterRequestService.java

Rule Violation Priority Line
AutowiredFields @Autowired fields naming conventions 3 11
AutowiredFields @Autowired fields naming conventions 3 14
MethodArgumentCouldBeFinal Parameter 'personalityName' is not assigned and could be declared final 3 16
UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 4 16
MethodArgumentCouldBeFinal Parameter 'messages' is not assigned and could be declared final 3 16

coder - io/github/magwas/coder/OpenRouterResponseService.java

Rule Violation Priority Line
AutowiredFields @Autowired fields naming conventions 3 16
AutowiredFields @Autowired fields naming conventions 3 19
AutowiredFields @Autowired fields naming conventions 3 22
MethodArgumentCouldBeFinal Parameter 'responseBody' is not assigned and could be declared final 3 24
MethodArgumentCouldBeFinal Parameter 'durationMs' is not assigned and could be declared final 3 24
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 16, but has at least 29 characters appended. 3 28
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 3335
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 3640
UnusedLocalVariable Avoid unused local variables such as 'seconds'. 3 54
MethodArgumentCouldBeFinal Parameter 'processedFiles' is not assigned and could be declared final 3 65
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 71
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 75

coder - io/github/magwas/coder/PathUtil.java

Rule Violation Priority Line
MethodArgumentCouldBeFinal Parameter 'path' is not assigned and could be declared final 3 8
MethodArgumentCouldBeFinal Parameter 'currentDir' is not assigned and could be declared final 3 8

coder - io/github/magwas/coder/PersonalityService.java

Rule Violation Priority Line
AutowiredFields @Autowired fields naming conventions 3 11
MethodArgumentCouldBeFinal Parameter 'personalityName' is not assigned and could be declared final 3 13

coder - io/github/magwas/coder/QuestionHandlerService.java

Rule Violation Priority Line
AutowiredFields @Autowired fields naming conventions 3 15
AutowiredFields @Autowired fields naming conventions 3 18
AutowiredFields @Autowired fields naming conventions 3 21
AutowiredFields @Autowired fields naming conventions 3 24
AutowiredFields @Autowired fields naming conventions 3 27
AutowiredFields @Autowired fields naming conventions 3 30
AutowiredFields @Autowired fields naming conventions 3 33
AutowiredFields @Autowired fields naming conventions 3 36
AutowiredFields @Autowired fields naming conventions 3 39
MethodArgumentCouldBeFinal Parameter 'personalityName' is not assigned and could be declared final 3 41
MethodArgumentCouldBeFinal Parameter 'question' is not assigned and could be declared final 3 41
AvoidLiteralsInIfCondition Avoid using literals such as 200 in if statements 3 57
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 64

coder - io/github/magwas/coder/SourceCodeReaderService.java

Rule Violation Priority Line
MethodArgumentCouldBeFinal Parameter 'dir' is not assigned and could be declared final 3 23
MethodArgumentCouldBeFinal Parameter 'xml' is not assigned and could be declared final 3 23
SystemPrintln Usage of System.out/err 2 65

coder - io/github/magwas/coder/SystemDependency.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 8

coder - io/github/magwas/coder/SystemExitSimulationException.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 3
MethodArgumentCouldBeFinal Parameter 'exitCode' is not assigned and could be declared final 3 6

coder - io/github/magwas/coder/SystemInstructionsService.java

Rule Violation Priority Line
AutowiredFields @Autowired fields naming conventions 3 13
MethodArgumentCouldBeFinal Parameter 'personalityName' is not assigned and could be declared final 3 15
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 3 2426

coder - io/github/magwas/coder/TimeDependency.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 6

coder - io/github/magwas/coder/XMLFileWriterService.java

Rule Violation Priority Line
AutowiredFields @Autowired fields naming conventions 3 17
AutowiredFields @Autowired fields naming conventions 3 20
AutowiredFields @Autowired fields naming conventions 3 23
MethodArgumentCouldBeFinal Parameter 'xmlContent' is not assigned and could be declared final 3 25
MethodArgumentCouldBeFinal Parameter 'path' is not assigned and could be declared final 3 47
MethodArgumentCouldBeFinal Parameter 'currentDir' is not assigned and could be declared final 3 47
AvoidThrowingRawExceptionTypes Avoid throwing raw exception type RuntimeException. 1 49

coder - io/github/magwas/coder/XmlProcessingUtil.java

Rule Violation Priority Line
MethodArgumentCouldBeFinal Parameter 'xmlContent' is not assigned and could be declared final 3 21
MethodArgumentCouldBeFinal Parameter 'xmlContent' is not assigned and could be declared final 3 33
MethodArgumentCouldBeFinal Parameter 'xmlContent' is not assigned and could be declared final 3 45

coder - io/github/magwas/coder/XmlUtil.java

Rule Violation Priority Line
MethodArgumentCouldBeFinal Parameter 'content' is not assigned and could be declared final 3 6

coder - io/github/magwas/coder/config/ApiKeyConfigService.java

Rule Violation Priority Line
AutowiredFields @Autowired fields naming conventions 3 11
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ErrorMessages': 'API_KEY_ERROR' is already in scope because it is inherited by an enclosing type 4 15

coder - io/github/magwas/coder/config/ConfigLoadService.java

Rule Violation Priority Line
AutowiredFields @Autowired fields naming conventions 3 18
AutowiredFields @Autowired fields naming conventions 3 21

coder - io/github/magwas/coder/config/ConfigState.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 6

coder - io/github/magwas/coder/conversation/ConversationAddMessageService.java

Rule Violation Priority Line
AutowiredFields @Autowired fields naming conventions 3 13
MethodArgumentCouldBeFinal Parameter 'message' is not assigned and could be declared final 3 15
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 3 20

coder - io/github/magwas/coder/conversation/ConversationClearService.java

Rule Violation Priority Line
AutowiredFields @Autowired fields naming conventions 3 11
UseExplicitTypes Use Explicit Types 3 14

coder - io/github/magwas/coder/conversation/ConversationGetMessagesService.java

Rule Violation Priority Line
AutowiredFields @Autowired fields naming conventions 3 11

coder - io/github/magwas/coder/conversation/ConversationHasSystemInstructionsService.java

Rule Violation Priority Line
AutowiredFields @Autowired fields naming conventions 3 9

coder - io/github/magwas/coder/conversation/ConversationSetupService.java

Rule Violation Priority Line
AutowiredFields @Autowired fields naming conventions 3 17
AutowiredFields @Autowired fields naming conventions 3 20
AutowiredFields @Autowired fields naming conventions 3 23
AutowiredFields @Autowired fields naming conventions 3 26
MethodArgumentCouldBeFinal Parameter 'personalityName' is not assigned and could be declared final 3 28
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 3 34
MethodArgumentCouldBeFinal Parameter 'instructions' is not assigned and could be declared final 3 42
MethodArgumentCouldBeFinal Parameter 'sourceCode' is not assigned and could be declared final 3 42
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 45
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 47

coder - io/github/magwas/coder/conversation/ConversationSizeService.java

Rule Violation Priority Line
AutowiredFields @Autowired fields naming conventions 3 9

coder - io/github/magwas/coder/conversation/ConversationStateData.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 7

coder - io/github/magwas/coder/config/tests/ConfigLoadServiceStub.java

Rule Violation Priority Line
ExceptionAsFlowControl Exception thrown at line 16 is caught in this block. 3 2223
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 22

coder - io/github/magwas/coder/tests/ConsoleInputServiceStub.java

Rule Violation Priority Line
MethodArgumentCouldBeFinal Parameter 'state' is not assigned and could be declared final 3 21

coder - io/github/magwas/coder/tests/ObjectMapperComponentStub.java

Rule Violation Priority Line
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 22

coder - io/github/magwas/coder/tests/OpenRouterClientServiceStub.java

Rule Violation Priority Line
AvoidThrowingRawExceptionTypes Avoid throwing raw exception type RuntimeException. 1 15
ExceptionAsFlowControl Exception thrown at line 15 is caught in this block. 3 2122
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 21

coder - io/github/magwas/coder/tests/OpenRouterClientServiceTest.java

Rule Violation Priority Line
JUnit5TestShouldBePackagePrivate JUnit 5 tests should be package-private. 3 19
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 3 32

coder - io/github/magwas/coder/tests/OpenRouterResponseServiceTest.java

Rule Violation Priority Line
JUnit5TestShouldBePackagePrivate JUnit 5 tests should be package-private. 3 15
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 3 22
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 3 35

coder - io/github/magwas/coder/tests/QuestionHandlerServiceTest.java

Rule Violation Priority Line
UnnecessaryImport Unused static import 'org.junit.jupiter.api.Assertions.*' 4 3
JUnit5TestShouldBePackagePrivate JUnit 5 tests should be package-private. 3 20
MissingOverride The method 'setUp()' is missing an @Override annotation. 3 32

coder - io/github/magwas/coder/tests/SystemDependencyStub.java

Rule Violation Priority Line
MutableStaticState Do not use non-final non-private static fields 3 12

coder - io/github/magwas/coder/tests/TestUtil.java

Rule Violation Priority Line
MethodArgumentCouldBeFinal Parameter 'target' is not assigned and could be declared final 3 12
MethodArgumentCouldBeFinal Parameter 'dependencyClass' is not assigned and could be declared final 3 12
AvoidAccessibilityAlteration You should not modify visibility of constructors, methods or fields using setAccessible() 3 16
AvoidThrowingRawExceptionTypes Avoid throwing raw exception type RuntimeException. 1 21

coder - io/github/magwas/coder/tests/XMLFileWriterServiceStub.java

Rule Violation Priority Line
UnnecessaryImport Unused static import 'org.mockito.ArgumentMatchers.*' 4 3
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 17

coder - io/github/magwas/coder/tests/XMLFileWriterServiceTest.java

Rule Violation Priority Line
UnnecessaryImport Unused static import 'org.mockito.Mockito.*' 4 4
JUnit5TestShouldBePackagePrivate JUnit 5 tests should be package-private. 3 17
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 3 24
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 3 32
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 3 40

coder - io/github/magwas/coder/tests/XmlProcessingUtilStub.java

Rule Violation Priority Line
UnnecessaryImport Unused static import 'org.mockito.Mockito.*' 4 3