-
Notifications
You must be signed in to change notification settings - Fork 64
fix(assessors): recognize go vet, yamllint, shellcheck, bash -n in single-file verification #537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,8 +52,12 @@ def attribute(self) -> Attribute: | |
| (r"black\s+--check\s+(?!-)[\w./\-]*\.\w{1,10}(?=\s*(?:[`\n]|$))", "lint"), | ||
| (r"prettier\s+--check\s+(?!-)[\w./\-]*\.\w{1,10}(?=\s*(?:[`\n]|$))", "lint"), | ||
| (r"gofmt\s+(?!-)[\w./\-]*\.\w{1,10}(?=\s*(?:[`\n]|$))", "lint"), | ||
| (r"yamllint\s+(?!-)[\w./\-]*\.\w{1,10}(?=\s*(?:[`\n]|$))", "lint"), | ||
| (r"shellcheck\s+(?!-)[\w./\-]*\.\w{1,10}(?=\s*(?:[`\n]|$))", "lint"), | ||
| # Type check single file patterns | ||
| (r"mypy\s+(?!-)[\w./\-]*\.\w{1,10}(?=\s*(?:[`\n]|$))", "typecheck"), | ||
| (r"go\s+vet\s+(?!-)[\w./\-]*\.\w{1,10}(?=\s*(?:[`\n]|$))", "typecheck"), | ||
| (r"bash\s+-n\s+(?!-)[\w./\-]*\.\w{1,10}(?=\s*(?:[`\n]|$))", "typecheck"), | ||
|
Comment on lines
+55
to
+60
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift Use the shared assessor scoring contract. The new patterns extend As per coding guidelines, assessors must use 🤖 Prompt for AI AgentsSources: Coding guidelines, Path instructions |
||
| (r"pyright\s+(?!-)[\w./\-]*\.\w{1,10}(?=\s*(?:[`\n]|$))", "typecheck"), | ||
| (r"tsc\s+--noEmit\s+(?!-)[\w./\-]*\.\w{1,10}(?=\s*(?:[`\n]|$))", "typecheck"), | ||
| ] | ||
|
|
@@ -205,7 +209,18 @@ def _create_remediation(self) -> Remediation: | |
| "Ensure these commands work without a full build step", | ||
| "Target <5 seconds execution per file", | ||
| ], | ||
| tools=["ruff", "eslint", "mypy", "pyright", "tsc"], | ||
| tools=[ | ||
| "ruff", | ||
| "eslint", | ||
| "mypy", | ||
| "pyright", | ||
| "tsc", | ||
| "golangci-lint", | ||
| "go vet", | ||
| "yamllint", | ||
| "shellcheck", | ||
| "bash", | ||
| ], | ||
| commands=[ | ||
| "# Python", | ||
| "ruff check path/to/file.py", | ||
|
|
@@ -214,6 +229,15 @@ def _create_remediation(self) -> Remediation: | |
| "# JavaScript/TypeScript", | ||
| "npx eslint path/to/file.ts", | ||
| "npx tsc --noEmit path/to/file.ts", | ||
| "", | ||
| "# Go", | ||
| "golangci-lint run path/to/file.go", | ||
| "go vet path/to/file.go", | ||
| "", | ||
| "# YAML / Shell", | ||
| "yamllint path/to/file.yaml", | ||
| "shellcheck path/to/script.sh", | ||
| "bash -n path/to/script.sh", | ||
| ], | ||
| examples=[], | ||
| citations=[], | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Make the documented pass rule match the assessor.
The documentation says that one lint or type-check command is sufficient at Line 695.
SingleFileVerificationAssessor.assess()returnspassonly when bothfound_lintandfound_typecheckare true. A repository that documents onlyyamllint,shellcheck,go vet, orbash -ntherefore receives a partial failure. Update the documented criterion or change the assessor and tests together.Suggested documentation change
As per path instructions, keep
docs/attributes.mdin sync when changing recognized paths or pass/fail conditions.🤖 Prompt for AI Agents
Source: Path instructions