pdlc-lint
Solid代码质量检查与自动修复
AI & Automation 10 stars
2 forks Updated 1 weeks ago MIT
Install
Quality Score: 82/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# 代码质量检查与自动修复
<!-- @include templates/prompts/iron-law.md -->
对项目代码执行静态分析、风格检查和质量度量,自动修复可安全修复的问题,输出结构化报告。
## 子命令解析
从 `$ARGUMENTS` 中解析子命令和参数:
| 子命令 | 格式 | 说明 |
|--------|------|------|
| `check [目标]` | 运行全量检查,输出报告(默认子命令) |
| `fix [目标]` | 自动修复可安全修复的问题 |
| `setup` | 为项目配置 lint 工具链(检测技术栈,生成配置文件) |
- `目标` 可选,支持:服务名、应用名、目录路径、文件路径。不传则检查整个项目。
- 如果未提供子命令,默认执行 `check`。
---
## 工具链自动探测
扫描项目目录,按以下优先级检测已有的 lint 工具:
### 前端 / Node.js 项目
按优先级检测(找到第一个可用的即停止):
| 工具 | 检测方式 | 运行命令 |
|------|---------|---------|
| ESLint(flat config) | `eslint.config.*` 存在 | `npx eslint .` |
| ESLint(legacy) | `.eslintrc*` 存在 | `npx eslint .` |
| Biome | `biome.json` 或 `biome.jsonc` 存在 | `npx biome check .` |
| oxlint | `package.json` 含 `oxlint` 依赖 | `npx oxlint .` |
样式检查(与上述并行):
| 工具 | 检测方式 | 运行命令 |
|------|---------|---------|
| Stylelint | `.stylelintrc*` 或 `stylelint.config.*` 存在 | `npx stylelint "**/*.{css,scss,less}"` |
| Prettier | `.prettierrc*` 或 `prettier.config.*` 存在 | `npx prettier --check .` |
TypeScript 类型检查(如存在 `tsconfig.json`):
```bash
npx tsc --noEmit
```
### 后端 Java 项目
| 工具 | 检测方式 | 运行命令 |
|------|---------|---------|
| Checkstyle | `checkstyle*.xml` 或 pom.xml 含 checkstyle plugin | `mvn checkstyle:check` |
| SpotBugs | pom.xml 含 spotbugs plugin | `mvn spotbugs:check` |
| PMD | pom.xml 含 pmd plugin | `mvn pmd:check` |
| SonarQube | `sonar-project.properties` 或 pom.xml 含 sonar plugin | `mvn sonar:sonar`(需配置连接) |
| Spotless | pom.xml 含 spotless plugin | `mvn spotless:check` |
Gradl...
Details
- Author
- kanfu-panda
- Repository
- kanfu-panda/pdlc-skills
- Created
- 3 months ago
- Last Updated
- 1 weeks ago
- Language
- Shell
- License
- MIT
Bundled in these plugins
Similar Skills
Semantically similar based on skill content — not just same category
Code & Development Featured
eslint-fix
安全诊断并修复 ESLint error、warning 和配置兼容问题。用于用户要求运行 lint、解释 ESLint 报错、限定范围自动修复或迁移 ESLint 配置时;优先使用项目锁定的包管理器与版本,先预检再修改,不自动下载最新版或批量改写无关源码。
783 Updated 2 days ago
laolaoshiren AI & Automation Listed
forge-health
Use when running periodic repository health inspection, code debt scanning, or pre-milestone codebase audits.
1 Updated 2 days ago
gldu Code & Development Listed
code-quality-tooling
代码质量工具:格式化器(Prettier/Black/gofmt/EditorConfig)、linter(规则/预设/禁用/自动修复)、 semgrep 语义 grep 自定义规则。Use when the user asks to set up a formatter or linter, fix lint errors, or write custom lint rules. 触发于「配格式化/linter/修 lint 错误/写 lint 规则」。
1 Updated 4 days ago
AntheaLaffy