Linter Awesome
约 2 分钟阅读
跨语言通用静态检查引擎、安全/文档检查工具及各语言常见 Linter 索引。
跨语言通用规则与静态分析
- ast-grep/ast-grepGitHubast-grep/ast-grep
- MIT, Rust
- 基于 Tree-sitter 的跨语言 AST 搜索、自定义 YAML Lint 规则与自动化重构引擎
- semgrep/semgrepGitHubsemgrep/semgrep
- LGPL-2.1, C
- 跨语言轻量级静态分析与安全规则引擎(SAST),支持类源码语法编写自定义规则
凭据、拼写、文档与链接检查
- gitleaks/gitleaksGitHubgitleaks/gitleaksgitleaks/gitleaks · MIT, Go · 检测 git 仓库中的敏感信息 · to skip gitleaks check · pre-commit · .gitleaksignore · 配置 fingurepint 来 ignore笔记:gitleaks
- MIT, Go
- Git 历史与暂存区敏感凭据 / Secret 扫描工具
- crate-ci/typosGitHubcrate-ci/typos
- Apache-2.0, Rust
- 面向代码库的低误报高速拼写检查器
- streetsidesoftware/cspellGitHubstreetsidesoftware/cspell
- MIT, TypeScript
- 支持自定义词典与多文件类型的代码拼写检查工具
- vale-cli/valeGitHubvale-cli/vale
- MIT, Go
- 可编程的散文与技术文档风格 Linter(Markdown / AsciiDoc / reST / HTML)
- lycheeverse/lycheeGitHublycheeverse/lychee
- Apache-2.0, Rust
- 异步并发链接检查器,支持 Markdown / HTML / 纯文本中的本地与外部链接
- DavidAnson/markdownlintGitHubDavidAnson/markdownlint
- MIT, JavaScript
- Markdown 语法与风格规范检查器
- rvben/rumdlGitHubrvben/rumdl
- Rust 编写的高速 Markdown Linter 与 Formatter
多语言聚合运行器与 Git Hooks
- oxsecurity/megalinterGitHuboxsecurity/megalinter
- AGPL-3.0, Python
- 聚合数十种语言与格式 Linter 的 CI 一体化检查容器
- super-linter/super-linterGitHubsuper-linter/super-linter
- MIT, Shell
- GitHub 官方维护的多语言 Linter 组合运行器
- evilmartians/lefthookGitHubevilmartians/lefthook
- MIT, Go
- 高速跨语言 Git Hooks 调度器,适合本地并行跑 Lint 与格式化检查
- pre-commit/pre-commitGitHubpre-commit/pre-commitpre-commit/pre-commit · MIT, Python · 在 commit 前运行检查笔记:pre-commit
- MIT, Python
- 跨语言提交前检查 Hook 框架
按语言常见工具参考
- JS / TS / CSS:
- oxc-project/oxcGitHuboxc-project/oxc(MIT, Rust — Oxlint)
- biomejs/biomeGitHubbiomejs/biomebiomejs/biome · MIT, Rust · linter, formatter · roma -> biome · 参考 · 支持的语言 · 不支持格式化 HTML, CSS, Yaml, Markdown, GQL · prettier 支持所有这些笔记:biome(Apache-2.0, Rust,见 Biome笔记biomebiomejs/biome · MIT, Rust · linter, formatter · roma -> biome · 参考 · 支持的语言 · 不支持格式化 HTML, CSS, Yaml, Markdown, GQL · prettier 支持所有这些打开:/notes/web/dev/biome)
- eslint/eslintGitHubeslint/eslint(MIT, JavaScript,见 ESLint笔记eslinteslint-plugin-import · eslint-plugin-react · eslint-plugin-jsx-a11y · react/react-in-jsx-scope · 不要求 · ESBuild 还不支持 jsx - 因此需要 - esbuild#334打开:/notes/web/dev/eslint)
- stylelint/stylelintGitHubstylelint/stylelint(MIT, JavaScript)
- Python:astral-sh/ruffGitHubastral-sh/ruff(MIT, Rust)
- Go:
go vet、golangci/golangci-lintGitHubgolangci/golangci-lint(GPL-3.0, Go,见 golangci-lint笔记golangci-lintIgnore rules inside code: · Configuration Guide · Linters Reference · GitHub Action · Example .golangci.yml打开:/notes/languages/go/golangci-lint / Go Lint笔记Golang Lintervet · securego/gosec · dominikh/go-tools · 替代 gofmt - 更严格 · mvdan/gofumpt · mgechev/revive · go-critic/go-critic · https://go-critic.com/overview.html打开:/notes/languages/go/lint) - Rust:
clippy - Shell / Dockerfile / CI / SQL / Protobuf / YAML:
- koalaman/shellcheckGitHubkoalaman/shellcheck(GPL-3.0, Haskell)
- hadolint/hadolintGitHubhadolint/hadolint(GPL-3.0, Haskell)
- rhysd/actionlintGitHubrhysd/actionlint(MIT, Go — GitHub Actions)
- sqlfluff/sqlfluffGitHubsqlfluff/sqlfluff(MIT, Python)
- bufbuild/bufGitHubbufbuild/bufbufbuild/buf · BUFCACHEDIR · go-grpc · 关于兼容 ts-proto https://github.com/connectrpc/connect-es/issues/1030 · 注意 @bufbuild/protobuf @bufbuild/protoc-gen-es 需要配合 @connectrpc/connec...笔记:buf(Apache-2.0, Go — Protobuf)
- adrienverge/yamllintGitHubadrienverge/yamllint(GPL-3.0, Python)
关联信息
反向链接、本文链接的其他页面和外部资料。
反向链接
- Linter笔记 · Linter Awesome
跨语言、通用静态代码检查、AST 规则匹配、安全扫描与文档/拼写规范索引。代码格式化平台见 Formatter。 · Linter Awesome - 跨语言通用检查引擎、安全/凭据/文本检查工具与各语言常见 Linter 索引 · | 维度 | 关注点 | 典型工具 |
站内链接
- biome笔记 · Biome
biomejs/biome · MIT, Rust · linter, formatter · roma -> biome · 参考 · 支持的语言 · 不支持格式化 HTML, CSS, Yaml, Markdown, GQL · prettier 支持所有这些
- eslint笔记 · ESLint
eslint-plugin-import · eslint-plugin-react · eslint-plugin-jsx-a11y · react/react-in-jsx-scope · 不要求 · ESBuild 还不支持 jsx - 因此需要 - esbuild#334
- Golang Linter笔记 · Go Lint
vet · securego/gosec · dominikh/go-tools · 替代 gofmt - 更严格 · mvdan/gofumpt · mgechev/revive · go-critic/go-critic · https://go-critic.com/overview.html
- golangci-lint笔记 · golangci-lint
Ignore rules inside code: · Configuration Guide · Linters Reference · GitHub Action · Example .golangci.yml
参考资料
GitHub25 条
- adrienverge/yamllintgithub.com/adrienverge/yamllint
- ast-grep/ast-grepgithub.com/ast-grep/ast-grep
- astral-sh/ruffgithub.com/astral-sh/ruff
- biomejs/biomegithub.com/biomejs/biome
- bufbuild/bufgithub.com/bufbuild/buf
- crate-ci/typosgithub.com/crate-ci/typos
- DavidAnson/markdownlintgithub.com/DavidAnson/markdownlint
- eslint/eslintgithub.com/eslint/eslint
- evilmartians/lefthookgithub.com/evilmartians/lefthook
- gitleaks/gitleaksgithub.com/gitleaks/gitleaks
- golangci/golangci-lintgithub.com/golangci/golangci-lint
- hadolint/hadolintgithub.com/hadolint/hadolint
- koalaman/shellcheckgithub.com/koalaman/shellcheck
- lycheeverse/lycheegithub.com/lycheeverse/lychee
- oxc-project/oxcgithub.com/oxc-project/oxc
- oxsecurity/megalintergithub.com/oxsecurity/megalinter
- pre-commit/pre-commitgithub.com/pre-commit/pre-commit
- rhysd/actionlintgithub.com/rhysd/actionlint
- rvben/rumdlgithub.com/rvben/rumdl
- semgrep/semgrepgithub.com/semgrep/semgrep
- sqlfluff/sqlfluffgithub.com/sqlfluff/sqlfluff
- streetsidesoftware/cspellgithub.com/streetsidesoftware/cspell
- stylelint/stylelintgithub.com/stylelint/stylelint
- super-linter/super-lintergithub.com/super-linter/super-linter
- vale-cli/valegithub.com/vale-cli/vale