|
| 1 | +# Code Quality Scan Workshop |
| 2 | + |
| 3 | +[](https://devopsabcs-engineering.github.io/code-quality-scan-workshop/) |
| 4 | +[](LICENSE) |
| 5 | + |
| 6 | +Hands-on workshop for code quality scanning with ESLint, Ruff, jscpd, Lizard, and coverage tools. Learn to integrate a **4-tool scanning architecture** into your CI/CD pipelines and visualize results in GitHub Advanced Security, Azure DevOps Advanced Security, and Power BI. |
| 7 | + |
| 8 | +## Quick Start |
| 9 | + |
| 10 | +### Option 1: GitHub Codespaces (Recommended) |
| 11 | + |
| 12 | +1. Click **Code → Codespaces → New codespace** on this repository. |
| 13 | +2. Wait for the dev container to build (~3 minutes). |
| 14 | +3. Open the terminal and start with [Lab 00](labs/lab-00-prerequisites/). |
| 15 | + |
| 16 | +### Option 2: Local Setup |
| 17 | + |
| 18 | +1. Clone this repository: |
| 19 | + |
| 20 | + ```powershell |
| 21 | + git clone https://github.com/devopsabcs-engineering/code-quality-scan-workshop.git |
| 22 | + cd code-quality-scan-workshop |
| 23 | + ``` |
| 24 | + |
| 25 | +2. Clone the companion demo-app repository as a sibling: |
| 26 | + |
| 27 | + ```powershell |
| 28 | + git clone https://github.com/devopsabcs-engineering/code-quality-scan-demo-app.git |
| 29 | + ``` |
| 30 | + |
| 31 | +3. Install prerequisites from [Lab 00](labs/lab-00-prerequisites/). |
| 32 | + |
| 33 | +## Labs |
| 34 | + |
| 35 | +| # | Lab | Duration | Level | |
| 36 | +|---|-----|----------|-------| |
| 37 | +| 00 | [Prerequisites](labs/lab-00-prerequisites/) | 30 min | Beginner | |
| 38 | +| 01 | [Explore Demo Apps](labs/lab-01-explore-demo-apps/) | 30 min | Beginner | |
| 39 | +| 02 | [Linting](labs/lab-02-linting/) | 45 min | Intermediate | |
| 40 | +| 03 | [Complexity Analysis](labs/lab-03-complexity/) | 30 min | Intermediate | |
| 41 | +| 04 | [Duplication Detection](labs/lab-04-duplication/) | 30 min | Intermediate | |
| 42 | +| 05 | [Coverage Analysis](labs/lab-05-coverage/) | 45 min | Intermediate | |
| 43 | +| 06 | [GitHub Actions CI/CD](labs/lab-06-github-actions/) | 30 min | Intermediate | |
| 44 | +| 06-ADO | [ADO Pipelines CI/CD](labs/lab-06-ado-pipelines/) | 30 min | Intermediate | |
| 45 | +| 07 | [Remediation (GitHub)](labs/lab-07-remediation-github/) | 45 min | Advanced | |
| 46 | +| 07-ADO | [Remediation (ADO)](labs/lab-07-ado-remediation/) | 45 min | Advanced | |
| 47 | +| 08 | [Power BI Dashboard](labs/lab-08-dashboard/) | 45 min | Advanced | |
| 48 | + |
| 49 | +## Scanning Architecture |
| 50 | + |
| 51 | +The workshop teaches a **4-tool architecture** for comprehensive code quality scanning: |
| 52 | + |
| 53 | +| Tool | Role | Output | |
| 54 | +|------|------|--------| |
| 55 | +| Per-language linters (ESLint, Ruff, .NET Analyzers, Checkstyle, golangci-lint) | Static analysis | Native SARIF | |
| 56 | +| jscpd | Code duplication detection | Native SARIF | |
| 57 | +| Lizard | Cyclomatic complexity analysis | CSV → SARIF via `lizard-to-sarif.py` | |
| 58 | +| Coverage tools (Jest, pytest-cov, Coverlet, JaCoCo, go test) | Test coverage measurement | Various → SARIF via `coverage-to-sarif.py` | |
| 59 | + |
| 60 | +All results are normalized to **SARIF v2.1.0** and uploaded to GitHub Security tab or ADO Advanced Security for unified triage. |
| 61 | + |
| 62 | +## Companion Repository |
| 63 | + |
| 64 | +This workshop uses the [code-quality-scan-demo-app](https://github.com/devopsabcs-engineering/code-quality-scan-demo-app) repository, which contains: |
| 65 | + |
| 66 | +- 5 demo applications (TypeScript, Python, C#, Java, Go) with intentional quality violations |
| 67 | +- SARIF converter scripts for Lizard and coverage tools |
| 68 | +- CI/CD pipelines for GitHub Actions and Azure DevOps |
| 69 | +- Power BI PBIP report for quality dashboards |
| 70 | + |
| 71 | +## Prerequisites Summary |
| 72 | + |
| 73 | +- Node.js 20+ · Python 3.12+ · .NET 8 SDK · Java 21+ · Go 1.22+ |
| 74 | +- Docker Desktop (or Codespaces with Docker-in-Docker) |
| 75 | +- Visual Studio Code with ESLint, Python, C#, and Go extensions |
| 76 | +- GitHub CLI (`gh`) authenticated |
| 77 | + |
| 78 | +## Contributing |
| 79 | + |
| 80 | +See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on adding labs, screenshots, and fixes. |
| 81 | + |
| 82 | +## License |
| 83 | + |
| 84 | +This project is licensed under the MIT License — see [LICENSE](LICENSE) for details. |
0 commit comments