Commit 229ce72
committed
fix(ci): exclude template directory from CodeQL and YAML linting
Template files contain Jinja2 syntax that appears as invalid YAML/Python
to static analyzers before cookiecutter rendering. This commit adds
configuration files to exclude the {{cookiecutter.project_slug}}/ directory
from both CodeQL and yamllint analysis.
Changes:
- Add .yamllint config to exclude template directory from YAML validation
- Add .github/codeql-config.yml to exclude templates from code scanning
- Prevents false positives on Jinja2 template syntax ({%-, {{, etc.)
Resolves CodeQL and yamllint false positives on:
- {{cookiecutter.project_slug}}/.github/workflows/release.yml
- {{cookiecutter.project_slug}}/.github/workflows/scorecard.yml
Template files are validated AFTER cookiecutter rendering during
post-generation hooks and in generated project CI workflows.1 parent ba162a0 commit 229ce72
2 files changed
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments