CodeScan Blocks, Lines, and Field Inquiries
How various elements are counted within CodeScan
Last updated
Was this helpful?
How various elements are counted within CodeScan
Last updated
Was this helpful?
A 'block' in CodeScan refers to a defined segment of code that can be scanned in one operation. Specifically, a block consists of up to 40,000 lines of code. This metric is used to quantify and manage the code analysis process effectively.
In CodeScan, a 'line' of code is defined as any physical line in the codebase that contains at least one non-whitespace character and is not part of a comment. This definition ensures a consistent and accurate measurement of the actual code being analyzed, excluding whitespaces and comments.
When analyzing code containing queries with multiple fields, each field placed on a separate line is counted individually. For instance, if a query is structured with five fields, each on its own line, this will be counted as five lines in total. This granularity helps in providing a precise assessment of the code structure and volume.
CodeScan has two ways of counting the "Lines" in a project.
Lines
Lines of Code
The Lines of Code may not increase in a project, but the number of Lines may increase due to the addition of the Profiles and Permission Sets to the Salesforce project.
XML settings count as lines but not as Code. To see this, you can use a custom view in the activity graph:
No, lines that consist solely of whitespace or are part of comments are not included in the line count in CodeScan.
Only non-commented lines of code for Apex, Aura Lightning, and VisualForce languages are billable. JavaScript, HTML, CSS, and Salesforce Metadata languages are not considered.