facebook pixelCodiga Analysis Apex Rules, severity warning
BACK TO LIST

Apex rules

All the static analysis rules you need for the Salesforce APEX language. Use Codiga to analyze your code and automate your code reviews for APEX.

ApexCRUDViolation

Security
Warning

Validate CRUD permission before SOQL/DML operation

Learn more

ApexDoc

Documentation
Warning

Unexpected doc

ApexInsecureEndpoint

Security
Warning

Apex callouts should use encrypted communication channels

ApexSharingViolations

Security
Warning

Apex classes should declare a sharing model if DML or SOQL is used

ApexSOQLInjection

Security
Warning

Apex classes should escape variables merged in DML query

ApexSuggestUsingNamedCred

Security
Warning

Consider using named credentials for authenticated callouts

ApexUnitTestClassShouldHaveAsserts

Best practice
Warning

Apex unit test classes should have at least one System.assert() or assertEquals() or AssertNotEquals() call

AvoidDeeplyNestedIfStmts

Design
Warning

Deeply nested if..else statements are hard to read

AvoidGlobalModifier

Best practice
Warning

Avoid using global modifier

AvoidHardcodingId

Error prone
Warning

Avoid hardcoding IDs

AvoidLogicInTrigger

Best practice
Warning

Avoid logic in triggers

ClassNamingConventions

Code style
Warning

Class names should begin with an uppercase character

CyclomaticComplexity

Design
Warning

Cyclomatic complexity too high

DebugsShouldUseLoggingLevel

Best practice
Warning

Calls to System.debug should specify a logging level.

EmptyCatchBlock

Error prone
Warning

Avoid empty catch blocks

EmptyIfStmt

Error prone
Warning

Avoid empty if statements

EmptyStatementBlock

Error prone
Warning

Avoid empty block statements.

ExcessiveParameterList

Design
Warning

Avoid long parameter lists

ExcessivePublicCount

Design
Warning

This class has too many public methods and attributes

FieldNamingConventions

Code style
Warning

Check name conventions

FormalParameterNamingConventions

Code style
Warning

Check name conventions for formal parameters

IfElseStmtsMustUseBraces

Code style
Warning

Avoid using if...else statements without curly braces

IfStmtsMustUseBraces

Code style
Warning

Avoid using if statements without curly braces

LocalVariableNamingConventions

Code style
Warning

Check local variable names conventions

MethodNamingConventions

Code style
Warning

Method name does not begin with a lower case character.

NcssMethodCount

Design
Warning

Too many lines of code in a method

OneDeclarationPerLine

Code style
Warning

Use one statement for each line

OperationWithLimitsInLoop

Performance
Warning

Avoid operations in loops that may hit governor limits

PropertyNamingConventions

Code style
Warning

Ensure property name conventions

StdCyclomaticComplexity

Design
Warning

Check cyclomatic complexity

TooManyFields

Design
Warning

Too many fields

NcssConstructorCount

Best practice
Warning

The constructor has a high NCSS line count

NcssTypeCount

Best practice
Warning

The type has a high NCSS line count

MethodWithSameNameAsEnclosingClass

Error prone
Warning

Non-constructor methods should not have the same name as the enclosing class.

ApexUnitTestShouldNotUseSeeAllDataTrue

Best practice
Warning

Apex unit tests should not use @isTest(seeAllData=true) because it opens up the existing database data for unexpected modification by tests.

EmptyTryOrFinallyBlock

Design
Warning

Avoid empty try or finally blocks

SUBTYPE_OF_SEALED_CLASS

Design
Warning

Class shouldn't be extended, mixed in, or implemented because it's sealed.

CKV_AWS_63

Security
Warning

Ensure no IAM policies documents allow "*" as a statement's actions

CKV_AZURE_14

Security
Warning

Ensure web app redirects all HTTP traffic to HTTPS in Azure App Service

W4905

Design
Warning

Using deprecated decorator