Skip to content

Introduce CI#1

Merged
akohan91 merged 1 commit intodevelopfrom
feature/introduce-ci
Jul 19, 2025
Merged

Introduce CI#1
akohan91 merged 1 commit intodevelopfrom
feature/introduce-ci

Conversation

@akohan91
Copy link
Copy Markdown
Owner

No description provided.

@github-actions
Copy link
Copy Markdown

💚 PMD Analysis: No issues found

@akohan91 akohan91 force-pushed the feature/introduce-ci branch from f01f21c to a615e56 Compare July 19, 2025 02:37
@github-actions
Copy link
Copy Markdown

💚 PMD Analysis: No issues found

@github-actions
Copy link
Copy Markdown

💚 Deployment Validation Results:

  • Status: Success

@akohan91 akohan91 force-pushed the feature/introduce-ci branch from a615e56 to ff2480f Compare July 19, 2025 02:46
@github-actions
Copy link
Copy Markdown

💚 PMD Analysis: No issues found

@akohan91 akohan91 force-pushed the feature/introduce-ci branch from ff2480f to 78c1f64 Compare July 19, 2025 02:47
@github-actions
Copy link
Copy Markdown

💔 PMD Analysis: 8 issues found

Summary:

  • Total Issues: 8
  • Errors: 3
  • Warnings: 5
Issues list

📄 force-app/main/default/classes/DynamicSOQL.cls

⚠️ CognitiveComplexity (Design) - Line 4:21

The class 'DynamicSOQL' has a total cognitive complexity of 103 (highest 24), current threshold is 50

Rule Details

Methods that are highly complex are difficult to read and more costly to maintain. If you include too much decisional
logic within a single method, you make its behavior hard to understand and more difficult to modify.

Cognitive complexity is a measure of how difficult it is for humans to read and understand a method. Code that contains
a break in the control flow is more complex, whereas the use of language shorthands doesn't increase the level of
complexity. Nested control flows can make a method more difficult to understand, with each additional nesting of the
control flow leading to an increase in cognitive complexity.

Information about Cognitive complexity can be found in the original paper here:
https://www.sonarsource.com/docs/CognitiveComplexity.pdf

By default, this rule reports methods with a complexity of 15 or more. Reported methods should be broken down into less
complex components.

⚠️ CyclomaticComplexity (Design) - Line 4:21

The class 'DynamicSOQL' has a total cyclomatic complexity of 48 (highest 8).

Rule Details

The complexity of methods directly affects maintenance costs and readability. Concentrating too much decisional logic
in a single method makes its behaviour hard to read and change.

Cyclomatic complexity assesses the complexity of a method by counting the number of decision points in a method,
plus one for the method entry. Decision points are places where the control flow jumps to another place in the
program. As such, they include all control flow statements, such as 'if', 'while', 'for', and 'case'.

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. By default, this rule reports methods with a complexity >= 10.
Additionally, classes with many methods of moderate complexity get reported as well once the total of their
methods' complexities reaches 40, even if none of the methods was directly reported.

Reported methods should be broken down into several smaller methods. Reported classes should probably be broken down
into subcomponents.

⚠️ EagerlyLoadedDescribeSObjectResult (Performance) - Line 49:27

DescribeSObjectResult could be being loaded eagerly with all child relationships.

Rule Details

This rule finds DescribeSObjectResults which could have been loaded eagerly via SObjectType.getDescribe().

When using SObjectType.getDescribe() or Schema.describeSObjects() without supplying a SObjectDescribeOptions,
implicitly it will be using SObjectDescribeOptions.DEFAULT and then all
child relationships will be loaded eagerly regardless whether this information is needed or not.
This has a potential negative performance impact. Instead SObjectType.getDescribe(options)
or Schema.describeSObjects(SObjectTypes, options)
should be used and a SObjectDescribeOptions should be supplied. By using
SObjectDescribeOptions.DEFERRED the describe attributes will be lazily initialized at first use.

Lazy loading DescribeSObjectResult on picklist fields is not always recommended. The lazy loaded
describe objects might not be 100% accurate. It might be safer to explicitly use
SObjectDescribeOptions.FULL in such a case. The same applies when you need the same DescribeSObjectResult
to be consistent across different contexts and API versions.

Properties:

  • noDefault: The behavior of SObjectDescribeOptions.DEFAULT changes from API Version 43 to 44:
    With API Version 43, the attributes are loaded eagerly. With API Version 44, they are loaded lazily.
    Simply using SObjectDescribeOptions.DEFAULT doesn't automatically make use of lazy loading.
    (unless "Use Improved Schema Caching" critical update is applied, SObjectDescribeOptions.DEFAULT does fallback
    to lazy loading)
    With this property enabled, such usages are found.
    You might ignore this, if you can make sure, that you don't run a mix of API Versions.

⚠️ CognitiveComplexity (Design) - Line 211:9

The method 'stringify()' has a cognitive complexity of 24, current threshold is 15

Rule Details

Methods that are highly complex are difficult to read and more costly to maintain. If you include too much decisional
logic within a single method, you make its behavior hard to understand and more difficult to modify.

Cognitive complexity is a measure of how difficult it is for humans to read and understand a method. Code that contains
a break in the control flow is more complex, whereas the use of language shorthands doesn't increase the level of
complexity. Nested control flows can make a method more difficult to understand, with each additional nesting of the
control flow leading to an increase in cognitive complexity.

Information about Cognitive complexity can be found in the original paper here:
https://www.sonarsource.com/docs/CognitiveComplexity.pdf

By default, this rule reports methods with a complexity of 15 or more. Reported methods should be broken down into less
complex components.

📄 force-app/main/default/classes/DynamicSOQLConditionBlock.cls

⚠️ CognitiveComplexity (Design) - Line 70:9

The method 'stringify(String, DynamicSOQL.ISobjectFieldPathConstructable)' has a cognitive complexity of 17, current threshold is 15

Rule Details

Methods that are highly complex are difficult to read and more costly to maintain. If you include too much decisional
logic within a single method, you make its behavior hard to understand and more difficult to modify.

Cognitive complexity is a measure of how difficult it is for humans to read and understand a method. Code that contains
a break in the control flow is more complex, whereas the use of language shorthands doesn't increase the level of
complexity. Nested control flows can make a method more difficult to understand, with each additional nesting of the
control flow leading to an increase in cognitive complexity.

Information about Cognitive complexity can be found in the original paper here:
https://www.sonarsource.com/docs/CognitiveComplexity.pdf

By default, this rule reports methods with a complexity of 15 or more. Reported methods should be broken down into less
complex components.

📄 force-app/main/default/classes/DynamicSOQLOrderBy.cls

🛑 AvoidBooleanMethodParameters (Design) - Line 15:56

Avoid Boolean method parameters

Rule Details

Boolean parameters in a system's API can make method calls difficult to understand and
maintain. They often indicate that a method is doing more than one thing and
could benefit from being split into separate methods with more descriptive
names.

        This rule flags any boolean parameters found in public or global methods,
        encouraging developers to use more expressive alternatives such as enums,
        separate methods, or configuration objects.

🛑 AvoidBooleanMethodParameters (Design) - Line 19:56

Avoid Boolean method parameters

Rule Details

Boolean parameters in a system's API can make method calls difficult to understand and
maintain. They often indicate that a method is doing more than one thing and
could benefit from being split into separate methods with more descriptive
names.

        This rule flags any boolean parameters found in public or global methods,
        encouraging developers to use more expressive alternatives such as enums,
        separate methods, or configuration objects.

🛑 AvoidBooleanMethodParameters (Design) - Line 19:72

Avoid Boolean method parameters

Rule Details

Boolean parameters in a system's API can make method calls difficult to understand and
maintain. They often indicate that a method is doing more than one thing and
could benefit from being split into separate methods with more descriptive
names.

        This rule flags any boolean parameters found in public or global methods,
        encouraging developers to use more expressive alternatives such as enums,
        separate methods, or configuration objects.

@github-actions
Copy link
Copy Markdown

💚 Deployment Validation Results:

  • Status: Success

1 similar comment
@github-actions
Copy link
Copy Markdown

💚 Deployment Validation Results:

  • Status: Success

@akohan91 akohan91 merged commit 890c803 into develop Jul 19, 2025
2 checks passed
@akohan91 akohan91 deleted the feature/introduce-ci branch July 19, 2025 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants