PMD Results

The following document contains the results of PMD 6.29.0.

Violations By Priority

Priority 1

com/varmateo/yawg/core/DirBakeOptions.java

Rule Violation Line FieldNamingConventions The final field name 'templateName' doesn't match '_[a-z][a-zA-Z0-9]*' 31 FieldNamingConventions The final field name 'filesToExclude' doesn't match '_[a-z][a-zA-Z0-9]*' 37 FieldNamingConventions The final field name 'filesToExcludeHere' doesn't match '_[a-z][a-zA-Z0-9]*' 42 FieldNamingConventions The final field name 'filesToIncludeHere' doesn't match '_[a-z][a-zA-Z0-9]*' 48 FieldNamingConventions The final field name 'bakerTypes' doesn't match '_[a-z][a-zA-Z0-9]*' 53 FieldNamingConventions The final field name 'pageVars' doesn't match '_[a-z][a-zA-Z0-9]*' 59 FieldNamingConventions The final field name 'pageVarsHere' doesn't match '_[a-z][a-zA-Z0-9]*' 66 FieldNamingConventions The final field name 'templatesHere' doesn't match '_[a-z][a-zA-Z0-9]*' 72 FieldNamingConventions The final field name 'extraDirsHere' doesn't match '_[a-z][a-zA-Z0-9]*' 81

Priority 3

com/varmateo/yawg/breadcrumbs/Breadcrumbs.java

Rule Violation Line AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 98

com/varmateo/yawg/commonmark/CommonMarkPageBaker.java

Rule Violation Line TooManyMethods This class has too many methods, consider refactoring it. 39274

com/varmateo/yawg/core/BakerMatcher.java

Rule Violation Line AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 158 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 207 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 218

com/varmateo/yawg/core/CoreSiteBaker.java

Rule Violation Line ProperLogger Logger should be defined private static final and have the correct class 35

com/varmateo/yawg/core/DirBakeOptions.java

Rule Violation Line AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 89 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 90 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 91 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 92 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 93 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 94 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 95 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 96 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 97 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 140141 TooManyMethods This class has too many methods, consider refactoring it. 154400

com/varmateo/yawg/core/DirBakeOptionsDao.java

Rule Violation Line AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 70 AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 159 PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 184 AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 195 LocalVariableCouldBeFinal Local variable 'bakerType' could be declared final 204 AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 223 AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 238 LocalVariableCouldBeFinal Local variable 'templateName' could be declared final 247 AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 268 PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 288

com/varmateo/yawg/core/DirBaker.java

Rule Violation Line ProperLogger Logger should be defined private static final and have the correct class 31

com/varmateo/yawg/core/FileBaker.java

Rule Violation Line ProperLogger Logger should be defined private static final and have the correct class 31 AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 63 PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 66

com/varmateo/yawg/freemarker/FreemarkerTemplateService.java

Rule Violation Line UnusedAssignment The initializer for variable 'fmTemplate' is never used (overwritten on line 108) 105

com/varmateo/yawg/spi/PageContextBuilder.java

Rule Violation Line NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 33 NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 35 NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 37 DataClass The class 'PageContextImpl' is suspected to be a Data Class (WOC=20.000%, NOPA=0, NOAM=4, WMC=6) 188256 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 204 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 205 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 206 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 207 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 208

com/varmateo/yawg/spi/TemplateContextBuilder.java

Rule Violation Line ImmutableField Private field '_authors' could be made final; it is only initialized in the declaration or constructor. 23 NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 38 NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 39 NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 40 NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 42 NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 43 DataClass The class 'TemplateContextImpl' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=7, WMC=8) 145235 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 163 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 164 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 165 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 166 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 167 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 168 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 169

com/varmateo/yawg/util/FileUtils.java

Rule Violation Line OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 169 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 184 UnusedLocalVariable Avoid unused local variables such as 'result'. 212 PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 212 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 215

com/varmateo/yawg/util/GlobMatcher.java

Rule Violation Line AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 149 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 150 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 162 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 176 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 177 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 188

com/varmateo/yawg/util/Trys.java

Rule Violation Line OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 44 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 67 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 69 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 97 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 99

com/varmateo/yawg/util/YamlParser.java

Rule Violation Line UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 2054

Priority 4

com/varmateo/yawg/asciidoctor/AsciidoctorTemplateContext.java

Rule Violation Line UselessParentheses Useless parentheses. 103 UselessParentheses Useless parentheses. 103

com/varmateo/yawg/breadcrumbs/BreadcrumbsBakeListener.java

Rule Violation Line UnusedImports Avoid unused imports such as 'com.varmateo.yawg.api.YawgException' 11

com/varmateo/yawg/core/CollectiveTemplateService.java

Rule Violation Line UnusedImports Avoid unused imports such as 'com.varmateo.yawg.api.YawgException' 15

com/varmateo/yawg/core/CoreSiteBaker.java

Rule Violation Line UnusedImports Avoid unused imports such as 'com.varmateo.yawg.api.YawgException' 17

com/varmateo/yawg/core/DirBaker.java

Rule Violation Line UnusedImports Avoid unused imports such as 'com.varmateo.yawg.api.YawgException' 16

com/varmateo/yawg/logging/Log.java

Rule Violation Line ShortClassName Avoid short class names like Log 1495

com/varmateo/yawg/logging/LoggerLog.java

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

com/varmateo/yawg/logging/Logs.java

Rule Violation Line ShortClassName Avoid short class names like Logs 20135

com/varmateo/yawg/spi/PageContextBuilder.java

Rule Violation Line UselessParentheses Useless parentheses. 34

com/varmateo/yawg/util/FileUtils.java

Rule Violation Line UselessParentheses Useless parentheses. 55

com/varmateo/yawg/util/SimpleList.java

Rule Violation Line UnusedImports Avoid unused imports such as 'com.varmateo.yawg.api.YawgException' 15 UselessParentheses Useless parentheses. 97

com/varmateo/yawg/util/SimpleMap.java

Rule Violation Line UnusedImports Avoid unused imports such as 'com.varmateo.yawg.api.YawgException' 16 UselessParentheses Useless parentheses. 115

com/varmateo/yawg/util/Trys.java

Rule Violation Line ShortClassName Avoid short class names like Trys 18106

com/varmateo/yawg/util/YamlParser.java

Rule Violation Line UselessParentheses Useless parentheses. 41 UselessParentheses Useless parentheses. 41

Files

com/varmateo/yawg/asciidoctor/AsciidoctorTemplateContext.java

Rule Violation Priority Line UselessParentheses Useless parentheses. 4 103 UselessParentheses Useless parentheses. 4 103

com/varmateo/yawg/breadcrumbs/Breadcrumbs.java

Rule Violation Priority Line AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 98

com/varmateo/yawg/breadcrumbs/BreadcrumbsBakeListener.java

Rule Violation Priority Line UnusedImports Avoid unused imports such as 'com.varmateo.yawg.api.YawgException' 4 11

com/varmateo/yawg/commonmark/CommonMarkPageBaker.java

Rule Violation Priority Line TooManyMethods This class has too many methods, consider refactoring it. 3 39274

com/varmateo/yawg/core/BakerMatcher.java

Rule Violation Priority Line AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 158 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 207 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 218

com/varmateo/yawg/core/CollectiveTemplateService.java

Rule Violation Priority Line UnusedImports Avoid unused imports such as 'com.varmateo.yawg.api.YawgException' 4 15

com/varmateo/yawg/core/CoreSiteBaker.java

Rule Violation Priority Line UnusedImports Avoid unused imports such as 'com.varmateo.yawg.api.YawgException' 4 17 ProperLogger Logger should be defined private static final and have the correct class 3 35

com/varmateo/yawg/core/DirBakeOptions.java

Rule Violation Priority Line FieldNamingConventions The final field name 'templateName' doesn't match '_[a-z][a-zA-Z0-9]*' 1 31 FieldNamingConventions The final field name 'filesToExclude' doesn't match '_[a-z][a-zA-Z0-9]*' 1 37 FieldNamingConventions The final field name 'filesToExcludeHere' doesn't match '_[a-z][a-zA-Z0-9]*' 1 42 FieldNamingConventions The final field name 'filesToIncludeHere' doesn't match '_[a-z][a-zA-Z0-9]*' 1 48 FieldNamingConventions The final field name 'bakerTypes' doesn't match '_[a-z][a-zA-Z0-9]*' 1 53 FieldNamingConventions The final field name 'pageVars' doesn't match '_[a-z][a-zA-Z0-9]*' 1 59 FieldNamingConventions The final field name 'pageVarsHere' doesn't match '_[a-z][a-zA-Z0-9]*' 1 66 FieldNamingConventions The final field name 'templatesHere' doesn't match '_[a-z][a-zA-Z0-9]*' 1 72 FieldNamingConventions The final field name 'extraDirsHere' doesn't match '_[a-z][a-zA-Z0-9]*' 1 81 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 89 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 90 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 91 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 92 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 93 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 94 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 95 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 96 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 97 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 140141 TooManyMethods This class has too many methods, consider refactoring it. 3 154400

com/varmateo/yawg/core/DirBakeOptionsDao.java

Rule Violation Priority Line AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 3 70 AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 3 159 PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 184 AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 3 195 LocalVariableCouldBeFinal Local variable 'bakerType' could be declared final 3 204 AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 3 223 AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 3 238 LocalVariableCouldBeFinal Local variable 'templateName' could be declared final 3 247 AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 3 268 PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 288

com/varmateo/yawg/core/DirBaker.java

Rule Violation Priority Line UnusedImports Avoid unused imports such as 'com.varmateo.yawg.api.YawgException' 4 16 ProperLogger Logger should be defined private static final and have the correct class 3 31

com/varmateo/yawg/core/FileBaker.java

Rule Violation Priority Line ProperLogger Logger should be defined private static final and have the correct class 3 31 AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 3 63 PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 66

com/varmateo/yawg/freemarker/FreemarkerTemplateService.java

Rule Violation Priority Line UnusedAssignment The initializer for variable 'fmTemplate' is never used (overwritten on line 108) 3 105

com/varmateo/yawg/logging/Log.java

Rule Violation Priority Line ShortClassName Avoid short class names like Log 4 1495

com/varmateo/yawg/logging/LoggerLog.java

Rule Violation Priority Line UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 4 170 UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 4 185

com/varmateo/yawg/logging/Logs.java

Rule Violation Priority Line ShortClassName Avoid short class names like Logs 4 20135

com/varmateo/yawg/spi/PageContextBuilder.java

Rule Violation Priority Line NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 33 UselessParentheses Useless parentheses. 4 34 NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 35 NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 37 DataClass The class 'PageContextImpl' is suspected to be a Data Class (WOC=20.000%, NOPA=0, NOAM=4, WMC=6) 3 188256 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 204 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 205 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 206 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 207 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 208

com/varmateo/yawg/spi/TemplateContextBuilder.java

Rule Violation Priority Line ImmutableField Private field '_authors' could be made final; it is only initialized in the declaration or constructor. 3 23 NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 38 NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 39 NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 40 NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 42 NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 43 DataClass The class 'TemplateContextImpl' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=7, WMC=8) 3 145235 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 163 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 164 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 165 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 166 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 167 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 168 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 169

com/varmateo/yawg/util/FileUtils.java

Rule Violation Priority Line UselessParentheses Useless parentheses. 4 55 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 169 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 184 UnusedLocalVariable Avoid unused local variables such as 'result'. 3 212 PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 212 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 215

com/varmateo/yawg/util/GlobMatcher.java

Rule Violation Priority Line AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 149 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 150 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 162 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 176 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 177 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 188

com/varmateo/yawg/util/SimpleList.java

Rule Violation Priority Line UnusedImports Avoid unused imports such as 'com.varmateo.yawg.api.YawgException' 4 15 UselessParentheses Useless parentheses. 4 97

com/varmateo/yawg/util/SimpleMap.java

Rule Violation Priority Line UnusedImports Avoid unused imports such as 'com.varmateo.yawg.api.YawgException' 4 16 UselessParentheses Useless parentheses. 4 115

com/varmateo/yawg/util/Trys.java

Rule Violation Priority Line ShortClassName Avoid short class names like Trys 4 18106 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 44 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 67 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 69 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 97 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 99

com/varmateo/yawg/util/YamlParser.java

Rule Violation Priority Line UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 3 2054 UselessParentheses Useless parentheses. 4 41 UselessParentheses Useless parentheses. 4 41