Class VerificationProperties
java.lang.Object
org.pgcodekeeper.core.parsers.antlr.base.verification.VerificationProperties
Configuration properties for code verification rules.
Manages various verification settings including complexity limits,
formatting rules, and style preferences for database code analysis.
-
Constructor Summary
ConstructorsConstructorDescriptionVerificationProperties(Properties properties) Creates a new verification properties instance from a Properties object. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the expected indentation size in spaces.intReturns the maximum allowed cyclomatic complexity for functions.intReturns the maximum allowed length for functions.intReturns the maximum allowed number of parameters for functions.intbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanstatic VerificationPropertiesreadProperties(Path path) Reads verification properties from a file.
-
Constructor Details
-
VerificationProperties
Creates a new verification properties instance from a Properties object.- Parameters:
properties- the properties object containing verification configuration
-
-
Method Details
-
getMaxCyclomaticComplexity
public int getMaxCyclomaticComplexity()Returns the maximum allowed cyclomatic complexity for functions.- Returns:
- maximum cyclomatic complexity limit, or -1 if not set
-
getMaxFunctionLenght
public int getMaxFunctionLenght()Returns the maximum allowed length for functions.- Returns:
- maximum function length limit, or -1 if not set
-
getMaxFunctionParams
public int getMaxFunctionParams()Returns the maximum allowed number of parameters for functions.- Returns:
- maximum function parameters limit, or -1 if not set
-
getIndentSize
public int getIndentSize()Returns the expected indentation size in spaces.- Returns:
- indentation size in spaces
-
getMethodCount
public int getMethodCount() -
isCheckCaseWithElse
public boolean isCheckCaseWithElse() -
isCheckTempTable
public boolean isCheckTempTable() -
isCheckSpaceOnMath
public boolean isCheckSpaceOnMath() -
isCheckSemicolonAfterSimpleSql
public boolean isCheckSemicolonAfterSimpleSql() -
isCheckSpaceAfterIf
public boolean isCheckSpaceAfterIf() -
isCheckQuotesInTableColumn
public boolean isCheckQuotesInTableColumn() -
isCheckIndents
public boolean isCheckIndents() -
isSpaceAfterComma
public boolean isSpaceAfterComma() -
getAllowedFunctionStart
-
getDeniedUsers
-
readProperties
Reads verification properties from a file.- Parameters:
path- the path to the properties file- Returns:
- a new VerificationProperties instance loaded from the file
- Throws:
IOException- if an error occurs reading the file
-