jongpie/NebulaFramework

View on GitHub

Showing 81 of 81 total issues

The method 'execute' has a Standard Cyclomatic Complexity of 13.
Open

    public void execute() {

StdCyclomaticComplexity

Since: PMD 5.5.0

Priority: Medium

Categories: Complexity

Remediation Points: 12500000

Complexity directly affects maintenance costs is determined by the number of decision points in a method plus one for the method entry. The decision points include 'if', 'while', 'for', and 'case labels' calls. Generally, numbers ranging from 1-4 denote low complexity, 5-7 denote moderate complexity, 8-10 denote high complexity, and 11+ is very high complexity.

Example:

// This has a Cyclomatic Complexity = 12
    public class Foo {
1       public void example() {
2           if (a == b || (c == d && e == f)) {
3               if (a1 == b1) {
                    fiddle();
4               } else if a2 == b2) {
                    fiddle();
                } else {
                    fiddle();
                }
5           } else if (c == d) {
6               while (c == d) {
                    fiddle();
                }
7           } else if (e == f) {
8               for (int n = 0; n < h; n++) {
                    fiddle();
                }
            } else {
                switch (z) {
9                   case 1:
                        fiddle();
                        break;
10                  case 2:
                        fiddle();
                        break;
11                  case 3:
                        fiddle();
                        break;
12                  default:
                        fiddle();
                        break;
                }
            }
        }
    }

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
showMethodsComplexity true Add method average violations to the report
showClassesComplexity true Add class average violations to the report
cc_categories Complexity Code Climate Categories
ccremediationpoints_multiplier 250 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting
reportLevel 10 Cyclomatic Complexity reporting threshold

The class 'SObjectTriggerHandler' has a Standard Cyclomatic Complexity of 3 (Highest = 13).
Open

public abstract class SObjectTriggerHandler extends NebulaCore implements ISObjectTriggerHandler {

StdCyclomaticComplexity

Since: PMD 5.5.0

Priority: Medium

Categories: Complexity

Remediation Points: 12500000

Complexity directly affects maintenance costs is determined by the number of decision points in a method plus one for the method entry. The decision points include 'if', 'while', 'for', and 'case labels' calls. Generally, numbers ranging from 1-4 denote low complexity, 5-7 denote moderate complexity, 8-10 denote high complexity, and 11+ is very high complexity.

Example:

// This has a Cyclomatic Complexity = 12
    public class Foo {
1       public void example() {
2           if (a == b || (c == d && e == f)) {
3               if (a1 == b1) {
                    fiddle();
4               } else if a2 == b2) {
                    fiddle();
                } else {
                    fiddle();
                }
5           } else if (c == d) {
6               while (c == d) {
                    fiddle();
                }
7           } else if (e == f) {
8               for (int n = 0; n < h; n++) {
                    fiddle();
                }
            } else {
                switch (z) {
9                   case 1:
                        fiddle();
                        break;
10                  case 2:
                        fiddle();
                        break;
11                  case 3:
                        fiddle();
                        break;
12                  default:
                        fiddle();
                        break;
                }
            }
        }
    }

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
showMethodsComplexity true Add method average violations to the report
showClassesComplexity true Add class average violations to the report
cc_categories Complexity Code Climate Categories
ccremediationpoints_multiplier 250 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting
reportLevel 10 Cyclomatic Complexity reporting threshold

The method 'objectToQueryString' has a Standard Cyclomatic Complexity of 16.
Open

    protected virtual String objectToQueryString(Object valueToFormat) {

StdCyclomaticComplexity

Since: PMD 5.5.0

Priority: Medium

Categories: Complexity

Remediation Points: 12500000

Complexity directly affects maintenance costs is determined by the number of decision points in a method plus one for the method entry. The decision points include 'if', 'while', 'for', and 'case labels' calls. Generally, numbers ranging from 1-4 denote low complexity, 5-7 denote moderate complexity, 8-10 denote high complexity, and 11+ is very high complexity.

Example:

// This has a Cyclomatic Complexity = 12
    public class Foo {
1       public void example() {
2           if (a == b || (c == d && e == f)) {
3               if (a1 == b1) {
                    fiddle();
4               } else if a2 == b2) {
                    fiddle();
                } else {
                    fiddle();
                }
5           } else if (c == d) {
6               while (c == d) {
                    fiddle();
                }
7           } else if (e == f) {
8               for (int n = 0; n < h; n++) {
                    fiddle();
                }
            } else {
                switch (z) {
9                   case 1:
                        fiddle();
                        break;
10                  case 2:
                        fiddle();
                        break;
11                  case 3:
                        fiddle();
                        break;
12                  default:
                        fiddle();
                        break;
                }
            }
        }
    }

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
showMethodsComplexity true Add method average violations to the report
showClassesComplexity true Add class average violations to the report
cc_categories Complexity Code Climate Categories
ccremediationpoints_multiplier 250 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting
reportLevel 10 Cyclomatic Complexity reporting threshold

The class 'QueryArgumentFormatter' has a Standard Cyclomatic Complexity of 4 (Highest = 16).
Open

public virtual class QueryArgumentFormatter extends NebulaCore implements IQueryArgumentFormatter {

StdCyclomaticComplexity

Since: PMD 5.5.0

Priority: Medium

Categories: Complexity

Remediation Points: 12500000

Complexity directly affects maintenance costs is determined by the number of decision points in a method plus one for the method entry. The decision points include 'if', 'while', 'for', and 'case labels' calls. Generally, numbers ranging from 1-4 denote low complexity, 5-7 denote moderate complexity, 8-10 denote high complexity, and 11+ is very high complexity.

Example:

// This has a Cyclomatic Complexity = 12
    public class Foo {
1       public void example() {
2           if (a == b || (c == d && e == f)) {
3               if (a1 == b1) {
                    fiddle();
4               } else if a2 == b2) {
                    fiddle();
                } else {
                    fiddle();
                }
5           } else if (c == d) {
6               while (c == d) {
                    fiddle();
                }
7           } else if (e == f) {
8               for (int n = 0; n < h; n++) {
                    fiddle();
                }
            } else {
                switch (z) {
9                   case 1:
                        fiddle();
                        break;
10                  case 2:
                        fiddle();
                        break;
11                  case 3:
                        fiddle();
                        break;
12                  default:
                        fiddle();
                        break;
                }
            }
        }
    }

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
showMethodsComplexity true Add method average violations to the report
showClassesComplexity true Add class average violations to the report
cc_categories Complexity Code Climate Categories
ccremediationpoints_multiplier 250 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting
reportLevel 10 Cyclomatic Complexity reporting threshold

This class has too many public methods and attributes
Open

public class SObjectQueryBuilder extends QueryBuilder implements ISObjectQueryBuilder {

ExcessivePublicCount

Since: PMD 5.5.0

Priority: Medium

Categories: Complexity

Remediation Points: 7500000

Classes with large numbers of public methods and attributes require disproportionate testing efforts since combinational side effects grow rapidly and increase risk. Refactoring these classes into smaller ones not only increases testability and reliability but also allows new variations to be developed easily.

Example:

public class Foo {
    public String value;
    public Bar something;
    public Variable var;
    // [... more more public attributes ...]

    public void doWork() {}
    public void doMoreWork() {}
    public void doWorkAgain() {}
    // [... more more public methods ...]
}

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
topscore Top score value
minimum 25.0 Minimum reporting threshold
cc_categories Complexity Code Climate Categories
ccremediationpoints_multiplier 150 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting
sigma Sigma value

This class has too many public methods and attributes
Open

public class AggregateResultQueryBuilder extends QueryBuilder implements IAggregateResultQueryBuilder {

ExcessivePublicCount

Since: PMD 5.5.0

Priority: Medium

Categories: Complexity

Remediation Points: 7500000

Classes with large numbers of public methods and attributes require disproportionate testing efforts since combinational side effects grow rapidly and increase risk. Refactoring these classes into smaller ones not only increases testability and reliability but also allows new variations to be developed easily.

Example:

public class Foo {
    public String value;
    public Bar something;
    public Variable var;
    // [... more more public attributes ...]

    public void doWork() {}
    public void doMoreWork() {}
    public void doWorkAgain() {}
    // [... more more public methods ...]
}

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
topscore Top score value
minimum 25.0 Minimum reporting threshold
cc_categories Complexity Code Climate Categories
ccremediationpoints_multiplier 150 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting
sigma Sigma value

Avoid long parameter lists
Open

    protected virtual void executeBeforeUpdate(List<SObject> updatedRecordList, Map<Id, SObject> updatedRecordMap, List<SObject> oldRecordList, Map<Id, SObject> oldRecordMap) {}

ExcessiveParameterList

Since: PMD 5.5.0

Priority: Medium

Categories: Complexity

Remediation Points: 2500000

Methods with numerous parameters are a challenge to maintain, especially if most of them share the same datatype. These situations usually denote the need for new objects to wrap the numerous parameters.

Example:

// too many arguments liable to be mixed up
public void addPerson(int birthYear, int birthMonth, int birthDate, int height, int weight, int ssn) {
    ...
}
// preferred approach 
public void addPerson(Date birthdate, BodyMeasurements measurements, int ssn) {
    ...
}

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
topscore Top score value
minimum 4.0 Minimum reporting threshold
cc_categories Complexity Code Climate Categories
ccremediationpoints_multiplier 50 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting
sigma Sigma value

Avoid long parameter lists
Open

    protected virtual void executeAfterUpdate(List<SObject> updatedRecordList, Map<Id, SObject> updatedRecordMap, List<SObject> oldRecordList, Map<Id, SObject> oldRecordMap) {}

ExcessiveParameterList

Since: PMD 5.5.0

Priority: Medium

Categories: Complexity

Remediation Points: 2500000

Methods with numerous parameters are a challenge to maintain, especially if most of them share the same datatype. These situations usually denote the need for new objects to wrap the numerous parameters.

Example:

// too many arguments liable to be mixed up
public void addPerson(int birthYear, int birthMonth, int birthDate, int height, int weight, int ssn) {
    ...
}
// preferred approach 
public void addPerson(Date birthdate, BodyMeasurements measurements, int ssn) {
    ...
}

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
topscore Top score value
minimum 4.0 Minimum reporting threshold
cc_categories Complexity Code Climate Categories
ccremediationpoints_multiplier 50 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting
sigma Sigma value

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

public abstract class QueryBuilder extends NebulaCore {

ApexSharingViolations

Since: PMD 5.5.3

Priority: Medium

Categories: Security

Remediation Points: 250000

Detect classes declared without explicit sharing mode if DML methods are used. This forces the developer to take access restrictions into account before modifying objects.

Example:

public class without sharing Foo {
// DML operation here
}

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
cc_categories Security Code Climate Categories
ccremediationpoints_multiplier 5 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting

Variables should start with a lowercase character, 'IsSandbox' starts with uppercase character.
Open

    public static Boolean IsSandbox {

VariableNamingConventions

Since: PMD 5.5.0

Priority: Medium

Categories: Style

Remediation Points: 250000

A variable naming conventions rule - customize this to your liking. Currently, it checks for final variables that should be fully capitalized and non-final variables that should not include underscores.

Example:

public class Foo {
    public static final Integer MY_NUM = 0;
    public String myTest = '';
    DataModule dmTest = new DataModule();
}

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
parameterSuffix Method parameter variable suffixes
parameterPrefix Method parameter variable prefixes
localSuffix Local variable suffixes
localPrefix Local variable prefixes
memberSuffix Member variable suffixes
memberPrefix Member variable prefixes
staticSuffix Static variable suffixes
staticPrefix Static variable prefixes
checkParameters true Check constructor and method parameter variables
checkLocals true Check local variables
cc_categories Style Code Climate Categories
ccremediationpoints_multiplier 5 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting
checkMembers true Check member variables

Variables should start with a lowercase character, 'LoggerSettings' starts with uppercase character.
Open

    public static NebulaLoggerSettings__c LoggerSettings {get; private set;}

VariableNamingConventions

Since: PMD 5.5.0

Priority: Medium

Categories: Style

Remediation Points: 250000

A variable naming conventions rule - customize this to your liking. Currently, it checks for final variables that should be fully capitalized and non-final variables that should not include underscores.

Example:

public class Foo {
    public static final Integer MY_NUM = 0;
    public String myTest = '';
    DataModule dmTest = new DataModule();
}

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
parameterSuffix Method parameter variable suffixes
parameterPrefix Method parameter variable prefixes
localSuffix Local variable suffixes
localPrefix Local variable prefixes
memberSuffix Member variable suffixes
memberPrefix Member variable prefixes
staticSuffix Static variable suffixes
staticPrefix Static variable prefixes
checkParameters true Check constructor and method parameter variables
checkLocals true Check local variables
cc_categories Style Code Climate Categories
ccremediationpoints_multiplier 5 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting
checkMembers true Check member variables

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

public abstract class DML extends NebulaCore implements IDML {

ApexSharingViolations

Since: PMD 5.5.3

Priority: Medium

Categories: Security

Remediation Points: 250000

Detect classes declared without explicit sharing mode if DML methods are used. This forces the developer to take access restrictions into account before modifying objects.

Example:

public class without sharing Foo {
// DML operation here
}

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
cc_categories Security Code Climate Categories
ccremediationpoints_multiplier 5 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting

Variables should start with a lowercase character, 'Message' starts with uppercase character.
Open

        public String Message {get; private set;}

VariableNamingConventions

Since: PMD 5.5.0

Priority: Medium

Categories: Style

Remediation Points: 250000

A variable naming conventions rule - customize this to your liking. Currently, it checks for final variables that should be fully capitalized and non-final variables that should not include underscores.

Example:

public class Foo {
    public static final Integer MY_NUM = 0;
    public String myTest = '';
    DataModule dmTest = new DataModule();
}

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
parameterSuffix Method parameter variable suffixes
parameterPrefix Method parameter variable prefixes
localSuffix Local variable suffixes
localPrefix Local variable prefixes
memberSuffix Member variable suffixes
memberPrefix Member variable prefixes
staticSuffix Static variable suffixes
staticPrefix Static variable prefixes
checkParameters true Check constructor and method parameter variables
checkLocals true Check local variables
cc_categories Style Code Climate Categories
ccremediationpoints_multiplier 5 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting
checkMembers true Check member variables

Variables should start with a lowercase character, 'Name' starts with uppercase character.
Open

    public static String Name {

VariableNamingConventions

Since: PMD 5.5.0

Priority: Medium

Categories: Style

Remediation Points: 250000

A variable naming conventions rule - customize this to your liking. Currently, it checks for final variables that should be fully capitalized and non-final variables that should not include underscores.

Example:

public class Foo {
    public static final Integer MY_NUM = 0;
    public String myTest = '';
    DataModule dmTest = new DataModule();
}

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
parameterSuffix Method parameter variable suffixes
parameterPrefix Method parameter variable prefixes
localSuffix Local variable suffixes
localPrefix Local variable prefixes
memberSuffix Member variable suffixes
memberPrefix Member variable prefixes
staticSuffix Static variable suffixes
staticPrefix Static variable prefixes
checkParameters true Check constructor and method parameter variables
checkLocals true Check local variables
cc_categories Style Code Climate Categories
ccremediationpoints_multiplier 5 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting
checkMembers true Check member variables

Variables should start with a lowercase character, 'TriggerHandlerSettings' starts with uppercase character.
Open

    public static NebulaTriggerHandlerSettings__c TriggerHandlerSettings {get; private set;}

VariableNamingConventions

Since: PMD 5.5.0

Priority: Medium

Categories: Style

Remediation Points: 250000

A variable naming conventions rule - customize this to your liking. Currently, it checks for final variables that should be fully capitalized and non-final variables that should not include underscores.

Example:

public class Foo {
    public static final Integer MY_NUM = 0;
    public String myTest = '';
    DataModule dmTest = new DataModule();
}

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
parameterSuffix Method parameter variable suffixes
parameterPrefix Method parameter variable prefixes
localSuffix Local variable suffixes
localPrefix Local variable prefixes
memberSuffix Member variable suffixes
memberPrefix Member variable prefixes
staticSuffix Static variable suffixes
staticPrefix Static variable prefixes
checkParameters true Check constructor and method parameter variables
checkLocals true Check local variables
cc_categories Style Code Climate Categories
ccremediationpoints_multiplier 5 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting
checkMembers true Check member variables

Variables should start with a lowercase character, 'Timestamp' starts with uppercase character.
Open

        public Datetime Timestamp {get; private set;}

VariableNamingConventions

Since: PMD 5.5.0

Priority: Medium

Categories: Style

Remediation Points: 250000

A variable naming conventions rule - customize this to your liking. Currently, it checks for final variables that should be fully capitalized and non-final variables that should not include underscores.

Example:

public class Foo {
    public static final Integer MY_NUM = 0;
    public String myTest = '';
    DataModule dmTest = new DataModule();
}

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
parameterSuffix Method parameter variable suffixes
parameterPrefix Method parameter variable prefixes
localSuffix Local variable suffixes
localPrefix Local variable prefixes
memberSuffix Member variable suffixes
memberPrefix Member variable prefixes
staticSuffix Static variable suffixes
staticPrefix Static variable prefixes
checkParameters true Check constructor and method parameter variables
checkLocals true Check local variables
cc_categories Style Code Climate Categories
ccremediationpoints_multiplier 5 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting
checkMembers true Check member variables

Variables should start with a lowercase character, 'ClassModule' starts with uppercase character.
Open

        public NebulaCore.Module ClassModule {get; private set;}

VariableNamingConventions

Since: PMD 5.5.0

Priority: Medium

Categories: Style

Remediation Points: 250000

A variable naming conventions rule - customize this to your liking. Currently, it checks for final variables that should be fully capitalized and non-final variables that should not include underscores.

Example:

public class Foo {
    public static final Integer MY_NUM = 0;
    public String myTest = '';
    DataModule dmTest = new DataModule();
}

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
parameterSuffix Method parameter variable suffixes
parameterPrefix Method parameter variable prefixes
localSuffix Local variable suffixes
localPrefix Local variable prefixes
memberSuffix Member variable suffixes
memberPrefix Member variable prefixes
staticSuffix Static variable suffixes
staticPrefix Static variable prefixes
checkParameters true Check constructor and method parameter variables
checkLocals true Check local variables
cc_categories Style Code Climate Categories
ccremediationpoints_multiplier 5 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting
checkMembers true Check member variables

Variables should start with a lowercase character, 'ClassName' starts with uppercase character.
Open

        public String ClassName {get; private set;}

VariableNamingConventions

Since: PMD 5.5.0

Priority: Medium

Categories: Style

Remediation Points: 250000

A variable naming conventions rule - customize this to your liking. Currently, it checks for final variables that should be fully capitalized and non-final variables that should not include underscores.

Example:

public class Foo {
    public static final Integer MY_NUM = 0;
    public String myTest = '';
    DataModule dmTest = new DataModule();
}

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
parameterSuffix Method parameter variable suffixes
parameterPrefix Method parameter variable prefixes
localSuffix Local variable suffixes
localPrefix Local variable prefixes
memberSuffix Member variable suffixes
memberPrefix Member variable prefixes
staticSuffix Static variable suffixes
staticPrefix Static variable prefixes
checkParameters true Check constructor and method parameter variables
checkLocals true Check local variables
cc_categories Style Code Climate Categories
ccremediationpoints_multiplier 5 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting
checkMembers true Check member variables

Variables should start with a lowercase character, 'NamespacePrefix' starts with uppercase character.
Open

    public static String NamespacePrefix {

VariableNamingConventions

Since: PMD 5.5.0

Priority: Medium

Categories: Style

Remediation Points: 250000

A variable naming conventions rule - customize this to your liking. Currently, it checks for final variables that should be fully capitalized and non-final variables that should not include underscores.

Example:

public class Foo {
    public static final Integer MY_NUM = 0;
    public String myTest = '';
    DataModule dmTest = new DataModule();
}

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
parameterSuffix Method parameter variable suffixes
parameterPrefix Method parameter variable prefixes
localSuffix Local variable suffixes
localPrefix Local variable prefixes
memberSuffix Member variable suffixes
memberPrefix Member variable prefixes
staticSuffix Static variable suffixes
staticPrefix Static variable prefixes
checkParameters true Check constructor and method parameter variables
checkLocals true Check local variables
cc_categories Style Code Climate Categories
ccremediationpoints_multiplier 5 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting
checkMembers true Check member variables

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

public class SObjectQueryBuilder extends QueryBuilder implements ISObjectQueryBuilder {

ApexSharingViolations

Since: PMD 5.5.3

Priority: Medium

Categories: Security

Remediation Points: 250000

Detect classes declared without explicit sharing mode if DML methods are used. This forces the developer to take access restrictions into account before modifying objects.

Example:

public class without sharing Foo {
// DML operation here
}

PMD properties

Name Value Description
violationSuppressRegex Suppress violations with messages matching a regular expression
violationSuppressXPath Suppress violations on nodes which match a given relative XPath expression.
cc_categories Security Code Climate Categories
ccremediationpoints_multiplier 5 Code Climate Remediation Points multiplier
ccblockhighlighting false Code Climate Block Highlighting
Severity
Category
Status
Source
Language