Code metrics
Measuring source code: its size, the complexity of its conditions, the coupling between classes and the cohesion inside one, and showing where those numbers concentrate across a package. Raising findings against a rule is static analysisStatic analysisCatching problems in code before it runs: naming, obsolete statements, security findings, and compatibility with a target environment. Style linting, security scanning and cloud-readiness checks are often treated as one concern.SAP and community, narrow by design.
Overview
The Code Metric Tool, program /SDF/CD_CUSTOM_CODE_METRIC, reached from transaction /SDF/CD_CCA, counts lines of code, statements and comments and computes complexity of conditions and complexity weighted by decision depth.
Not covered: At size and complexity. Coupling between objects and cohesion within a class are not among the metrics listed for it.
The metric list rests on a community article about the tool; no SAP page describing it was retrieved. How the community entries relate to the tool has not been assessed.
Artifacts
Details
Coverage
For your agent
- Ref
capability:code-metrics- JSON
- /capabilities/code-metrics.json
- MCP
- Connecting an agent