Skip to main content

Rule catalog

Built-in checks for bugs, code smells, conventions, and test code in PL/SQL, Oracle SQL, and supported Oracle Forms workflows. Search by rule ID or title to find the guidance you need.

73 of 73 rules

TagsApplies toDefault profile
AddParenthesesInNestedExpressionAdd parentheses in nested expressionMajorMain and test codeActive
CharacterDatatypeUsageUse VARCHAR2 instead of CHAR and VARCHARMinorobsoleteMain and test codeActive
CollapsibleIfStatementsCollapsible "if" statements should be mergedMajorclumsyMain and test codeActive
ColumnHidesPlSqlNameColumns should not shadow parameters or variables in SQL conditionsMajorbugMain and test codeActive
ColumnIntoSmallerVariableColumns should not be read into variables smaller than the columnMajorbugMain and test codeActive
ColumnsShouldHaveTableNameThe columns in a SELECT should be prefixed with table nameMajorMain and test codeActive
CommitRollbackAvoid COMMIT/ROLLBACK calls in database objectsMajorMain codeActive
ComparisonWithBooleanAvoid superfluous comparison against boolean literalsMinorMain and test codeActive
ComparisonWithNullDo not compare values against the NULL literal or an empty stringBlockerbugMain and test codeActive
ConcatenationWithNullUnnecessary concatenation with NULL valueMinorMain and test codeActive
ConflictingUtPlSqlAnnotationsConflicting utPLSQL annotationsMajorutplsql, bugTest codeActive
CursorBodyInPackageSpecDo not declare cursor bodies in a package specificationMajorMain codeNot active
DbmsOutputPutAvoid direct calls to DBMS_OUTPUT proceduresMinorMain codeActive
DeadCodeDead code should be removedMajorunusedMain and test codeActive
DeclareSectionWithoutDeclarationsDo not add the DECLARE keyword if the block doesn't have any declarationInfoMain and test codeActive
DeterministicFunctionDeterministic functions should not depend on external stateMajorbugMain and test codeActive
DisabledTestTests should not be disabledMajorutplsqlTest codeActive
DuplicateConditionIfElsifRelated "if/elsif" statements should not have the same conditionBlockerbugMain and test codeActive
DuplicatedValueInInDuplicated value in an IN conditionBlockerbugMain and test codeActive
EmptyBlockEmpty blocks should be removedMinorunusedMain and test codeActive
EmptyStringAssignmentAvoid using empty strings to represent NULLMinorMain and test codeActive
ExplicitInParameterParameter mode should be explicitly declaredMinorMain and test codeActive
FunctionShouldBeDeterministicConsider declaring suitable functions DETERMINISTICMinorMain and test codeNot active
FunctionWithOutParameterAvoid functions with OUT parametersMajorMain and test codeActive
FunctionWithoutReturnFunctions should not reach their end without returning a valueCriticalbugMain and test codeActive
IdenticalExpressionIdentical expressions should not be used on both sides of an operatorBlockerbugMain and test codeActive
IfWithExitUse EXIT WHEN instead of an IF statement to exit from a loopMinorMain and test codeActive
ImplicitColumnConversionCharacter columns should not be compared with numbers or datesMajorbug, performanceMain and test codeActive
IneffectiveUtPlSqlAnnotationutPLSQL annotations should not be placed in package bodiesMajorutplsql, bugTest codeActive
InequalityUsageOnly "<>" should be used to test inequalityMajorobsoleteMain and test codeActive
InsertWithoutColumnsAlways specify the columns in an INSERT statementCriticalconvention, bugMain and test codeActive
InvalidReferenceToObjectInvalid reference to Oracle Forms objectMajorbugMain codeActive
InvalidUtPlSqlAnnotationArgumentInvalid utPLSQL annotation argumentsMajorutplsql, bugTest codeActive
InvalidUtPlSqlContextStructureInvalid utPLSQL context structureMajorutplsql, bugTest codeActive
NotASelectedExpressionORDER BY items must appear in the select list if SELECT DISTINCT is specifiedCriticalbugMain and test codeActive
NotFoundUse cursor%NOTFOUND instead of NOT cursor%FOUNDMinorMain and test codeActive
NotInWithNullNOT IN should not be used with values that may be nullMajorbugMain and test codeActive
NullTestOnNotNullColumnIS NULL conditions should not test columns that can never be nullMajorbugMain and test codeActive
NvlWithNullParameterDo not pass a NULL literal or an empty string to NVLBlockerbugMain and test codeActive
OuterJoinDiscardedByConditionConditions should not discard the rows an outer join addsMajorbugMain and test codeActive
PackageBodyParameterNocopyPackage body parameters should match the specification's NOCOPY qualificationMajorbugMain and test codeActive
ParameterInDynamicSqlParameters should not be concatenated into dynamic SQLCriticalsecurityMain and test codeActive
ParsingErrorParser failureInfoMain and test codeNot active
QueryWithoutExceptionHandlingAvoid queries without an exception handling blockCriticalMain codeActive
RaiseStandardExceptionAvoid raising standard exceptionsMajorMain and test codeActive
RedundantExpectationTest expectations should not be redundantMajorutplsql, bugTest codeActive
ReturnOfBooleanExpressionReturn of boolean expressions should not be wrapped into an "if-then-else" statementMinorclumsyMain and test codeActive
SameBranchBranches in the same conditional structure should not have exactly the same implementationMajorbugMain and test codeActive
SameConditionIdentical conditions should not be duplicatedBlockerbugMain and test codeActive
SelectAllColumnsSELECT * should not be usedMajorperformanceMain and test codeActive
SelectWithRownumAndOrderByA SELECT cannot have a comparison with ROWNUM and an ORDER BY at the same levelBlockerbugMain and test codeActive
SequenceNextvalInConditionalResultSequence NEXTVAL should not be used in conditional resultsMajorbugMain and test codeActive
ToCharInOrderByAvoid TO_CHAR in an ORDER BY clauseMajorbugMain and test codeActive
ToDateWithoutFormatTO_DATE without date formatMajorbugMain and test codeActive
TooManyRowsHandlerAvoid masking the TOO_MANY_ROWS exceptionCriticalbugMain and test codeActive
UnhandledUserDefinedExceptionUser defined exceptions should be handledCriticalbugMain and test codeNot active
UnnecessaryAliasInQueryUnnecessary alias for table referenceMinorMain and test codeNot active
UnnecessaryElseUnnecessary ELSE clauseMinorMain and test codeActive
UnnecessaryLikeDo not use LIKE conditions without wildcardsMinorconfusingMain and test codeActive
UnnecessaryNullStatementUnnecessary NULL statementMinorMain and test codeActive
UnnecessaryStringLiteralConcatenationAdjacent string literals should be mergedMinorclumsyMain and test codeActive
UnresolvedUtPlSqlSetupCleanupReferenceUnresolved utPLSQL setup and cleanup referencesMajorutplsql, bugTest codeActive
UnusedCursorUnused cursors should be removedMajorunusedMain and test codeActive
UnusedParameterUnused parameters should be removedMajorunusedMain and test codeActive
UnusedVariableUnused local variables should be removedMajorunusedMain and test codeActive
UselessParenthesisUseless parentheses around expressions should be removed to prevent any misunderstandingMinorMain and test codeActive
UtPlSqlTestShouldHaveDescriptionutPLSQL tests should have descriptionsMinorutplsqlTest codeNot active
VariableHidingDo not redeclare variables in inner scopeMajorMain and test codeActive
VariableInCountDon't pass variables to COUNT functionBlockerbugMain and test codeActive
VariableInitializationWithFunctionCallAvoid initializing variables using functions in the declaration sectionMajorMain and test codeActive
VariableInitializationWithNullVariables and RECORD fields do not need to be initialized with NULLMinorMain and test codeActive
VariableNameVariables should comply with a naming conventionMinorMain and test codeActive
XPathTrack breaches of an XPath ruleMajorMain and test codeNot active