Base Code Analyzer
Overview
The baseCodeAnalyzer package contains a static code analysis tool for packages built on top of the C3 AI Platform. This static code analysis tool allows developers to detect code quality issues related to PSR anti-patterns, documentation, linting, security, deprecations and extensibility anti-patterns.
Learn more about the code quality metrics analyzed by the code analyzer here.
Learn more about configuring code analysis metrics using directive comments within the code here.
Running Static Code Analysis
Static code analysis can be run in the static console using the following API:
JavaScript
BaseCodeAnalysis.analyzeCurrentPackage();Run the following to run static code analysis on a dependency package, use:
JavaScript
BaseCodeAnalysis.analyzePackage('<packageName>');