perform all its functionality as expected (defined in acceptance criteria). 2. Software should meet all non-functional “abilities” (like scalability, reliability etc). 3. Code quality should be great with minimal technical debt. Ground term for Code Quality: “Code quality is an indicator of how quickly a developer can add business value to a software system”
- e.g. NullPointerException. 2. Coding Standards Breach - e.g. Not following Common Standards (For PHP PSR Standards) 3. Duplications 4. Lack of Unit Tests 5. Bad Distribution of Complexity - e.g. Cyclomatic Complexity, Cognitive Complexity 6. Not Enough or Too Many Comments - e.g. Comments are measured because they’re part of what makes a system easy (or not) to work on. 7. Spaghetti Design
- Jetbrains IDE (IntelliJ, PHPStorm, WebStorm), VSCode, Atom Use Static Analysis Tools in IDE and in CI - SonarLint, Php Inspections, ESLint, JSLint, JSHint Use Continuous Integration Environment - SonarQube in CI - Integrate with VCS Hooks (on Commit, on Pull/Merge Request)
2. Supports Wide range of Programming Languages 3. Executive Reporting in SonarQube SonarQube: 1. Community Edition 2. Includes 9 Programming Languages by default 3. Integrates easily with VCS (GitHub, GitLab, BitBucket etc) for Pull/Merge Request Analysis SonarLint: IDE Edition 1. Integrates with most-used IDEs 2. Detects Bugs, Vulnerabilities or Code Smells right in the IDE 3. Provides smart explanations
it will be difficult to maintain. In the worst cases, it will be so confusing that maintainers can inadvertently introduce bugs. Examples include duplicated code, uncovered code by unit tests and too complex code.
of a method’s control flow evaluating code based on mathematical models Problems with Cyclomatic Complexity: Formulated in 1976, no modern language structure support, do not necessarily present equal difficulty Cognitive Complexity: measures control flow that correspond to programmers’ intuitions about the mental, or cognitive effort required to understand those flows As a Remedy: formulated to address modern language structures, and to produce values that are meaningful at the class and application levels