lint-debt
Track, audit, and create GitHub issues for lint suppression comments across your codebase. Ensures every lint bypass has a corresponding tracking issue.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Track, audit, and create GitHub issues for lint suppression comments across your codebase. Ensures every lint bypass has a corresponding tracking issue.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Manage project board — issues, sprints, status tracking, acceptance verification, and release management. Supports GitHub Projects, Jira, and YouTrack via pluggable providers.
Manage project board — issues, sprints, status tracking, acceptance verification, and release management. Supports GitHub Projects, Jira, and YouTrack via pluggable providers.
Happy path smoke testing — navigates all configured endpoints, checks HTTP status and server logs for errors, and optionally auto-creates GitHub issues for failures. Config-driven via CC_SMOKE_TEST_* variables.
Manage GitHub Project board — issues, sprints, status tracking, acceptance verification, and release management. White-labeled template for any project.
Check for and apply cognitive-core framework updates. Compares installed agents, skills, and hooks against the framework source, shows available updates, and safely applies them.
Check for and apply cognitive-core framework updates. Compares installed agents, skills, and hooks against the framework source, shows available updates, and safely applies them.
| name | lint-debt |
| description | Track, audit, and create GitHub issues for lint suppression comments across your codebase. Ensures every lint bypass has a corresponding tracking issue. |
Track, audit, and create GitHub issues for lint suppression comments across your codebase.
Ensures every lint bypass (# lint-allow:, # noqa:, // eslint-disable, etc.) has a corresponding tracking issue.
scan — subcommand: scan, sync, reportThese variables are set in cognitive-core.conf (auto-populated by language packs):
| Variable | Default | Purpose |
|---|---|---|
CC_LINT_SUPPRESS_PATTERN | (from language pack) | ERE pattern matching lint suppressions |
CC_LINT_DEBT_AUTO_ISSUE | true | Enable auto-issue reminders in post-edit hook |
CC_LINT_DEBT_LABEL | technical-debt | GitHub label for debt tracking issues |
CC_ORG | (project config) | GitHub owner for gh commands |
CC_PROJECT_NAME | (project config) | GitHub repo name |
CC_SRC_ROOT | src | Source directory to scan |
CC_TEST_ROOT | tests | Test directory to scan |
scan (default) — Find All SuppressionsGrep for CC_LINT_SUPPRESS_PATTERN across source and test directories. Parse each match into: file, line number, rule name, reason.
Steps:
Read CC_LINT_SUPPRESS_PATTERN from config. If empty, detect from CC_LANGUAGE:
# lint-allow:# noqa:|# type: ignore|# pylint: disable=// eslint-disable|// @ts-ignore|// @ts-expect-error//nolint:@SuppressWarnings|//CHECKSTYLE:OFF#\[allow\(|#!\[allow\(#pragma warning disable|// ReSharper disableUse Grep tool to search across CC_SRC_ROOT and CC_TEST_ROOT:
Grep pattern=<CC_LINT_SUPPRESS_PATTERN> path=<CC_SRC_ROOT> output_mode=content
Grep pattern=<CC_LINT_SUPPRESS_PATTERN> path=<CC_TEST_ROOT> output_mode=content
Parse each match to extract:
die_statement from # lint-allow: die_statement)- Infrastructure code from # lint-allow: die_statement - Infrastructure code)Output grouped by rule:
## Lint Suppression Scan
| Rule | Count | Files |
|------|-------|-------|
| die_statement | 66 | 48 files |
| HashRefInflator | 4 | 4 files |
| direct_schema | 1 | 1 file |
**Total**: 71 suppressions across 52 files
### die_statement (66 occurrences)
| File | Line | Reason |
|------|------|--------|
| lib/TIMS/dao/UnifiedGenericDAO.pm | 28 | Infrastructure/framework code, system-level errors |
| ... | ... | ... |
sync — Create Missing GitHub IssuesCross-reference suppressions with GitHub issues to create tracking issues for untracked debt.
Steps:
Run scan logic to get all current suppressions grouped by rule.
Search GitHub for existing tracking issues:
gh issue list --repo <CC_ORG>/<CC_PROJECT_NAME> --label <CC_LINT_DEBT_LABEL> --state all --json number,title,state,body --limit 100
Match issues to suppression rules. Convention: issue title contains [lint-debt:<rule>] tag.
Example: [lint-debt:die_statement] Replace die with structured error handling
For each untracked rule group, create a GitHub issue:
gh issue create --repo <CC_ORG>/<CC_PROJECT_NAME> \
--title "[lint-debt:<rule>] <remediation summary>" \
--label "<CC_LINT_DEBT_LABEL>" \
--body "<issue body>"
Issue body template:
## Lint Debt: <rule>
**Suppression count**: N occurrences across M files
**Pattern**: `<suppression pattern used>`
### Affected Files
| File | Line | Reason |
|------|------|--------|
| `path/to/file.pm` | 28 | Infrastructure code |
| ... | ... | ... |
### Remediation
<guidance based on rule type>
---
*Auto-generated by `/lint-debt sync`. Updated: YYYY-MM-DD*
For tracked but stale issues (issue closed, suppressions remain): reopen or create new issue.
For tracked but resolved (issue open, no more suppressions): comment suggesting closure.
Report results:
## Lint Debt Sync Results
| Rule | Status | Issue |
|------|--------|-------|
| die_statement | Already tracked | #56 (open) |
| HashRefInflator | Created | #XX (new) |
| direct_schema | Created | #YY (new) |
**Created**: 2 | **Already tracked**: 1 | **Stale**: 0
report — Dashboard SummaryCross-reference suppressions with GitHub issues and show a comprehensive dashboard.
Steps:
scan logic.CC_LINT_DEBT_LABEL.git blame on each suppression line to determine when it was added.## Lint Debt Report
### Overview
| Metric | Value |
|--------|-------|
| Total suppressions | 71 |
| Unique rules | 3 |
| Tracked (has issue) | 1 |
| Untracked | 2 |
| Files affected | 52 |
### By Rule
| Rule | Count | Issue | Status | Oldest |
|------|-------|-------|--------|--------|
| die_statement | 66 | #56 | open | 2025-03-15 |
| HashRefInflator | 4 | — | untracked | 2025-11-01 |
| direct_schema | 1 | — | untracked | 2026-02-18 |
### Recommendations
- Run `/lint-debt sync` to create 2 missing tracking issues
- Consider prioritizing die_statement (66 occurrences, oldest debt)
| Language | Suppression Pattern (ERE) | Rule Extraction |
|---|---|---|
| perl | # lint-allow: | After : , before - |
| python | # noqa:|# type: ignore|# pylint: disable= | After noqa: / disable= |
| node | // eslint-disable|// @ts-ignore|// @ts-expect-error | After disable-next-line |
| go | //nolint: | After nolint: |
| java | @SuppressWarnings|//CHECKSTYLE:OFF | Inside ("...") |
| rust | #\[allow\(|#!\[allow\( | Inside allow(...) |
| csharp | #pragma warning disable|// ReSharper disable | After disable |
| Suppression | Meaning | Remediation |
|---|---|---|
@SuppressWarnings("unchecked") | Raw type usage | Add proper generics |
@SuppressWarnings("deprecation") | Using deprecated API | Migrate to replacement |
//CHECKSTYLE:OFF | Checkstyle bypass | Fix the violation |
//NOSONAR | SonarQube suppression | Address the code smell |
post-edit-lint.sh detects NEW suppressions via git diff and reminds to run /lint-debt sync/lint-debt report during sprint planning to prioritize debt reduction