shinagawa-web/gomarklint

GitHub: shinagawa-web/gomarklint

一款基于 Go 实现的快速、可配置 Markdown 语法检查器,解决文档结构化与一致性问题。

Stars: 14 | Forks: 2

# gomarklint ![Test](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/831baacd0b182109.svg) [![codecov](https://codecov.io/gh/shinagawa-web/gomarklint/graph/badge.svg?token=5MGCYZZY7S)](https://codecov.io/gh/shinagawa-web/gomarklint) [![Go Report Card](https://goreportcard.com/badge/github.com/shinagawa-web/gomarklint)](https://goreportcard.com/report/github.com/shinagawa-web/gomarklint) [![Go Reference](https://pkg.go.dev/badge/github.com/shinagawa-web/gomarklint.svg)](https://pkg.go.dev/github.com/shinagawa-web/gomarklint) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) English | [日本語](README.ja.md) **Quick install** (macOS / Linux): ``` curl -fsSL https://raw.githubusercontent.com/shinagawa-web/gomarklint/main/install.sh | sh ``` **Download binary** (no Go required): Download the latest binary for your platform from [GitHub Releases](https://github.com/shinagawa-web/gomarklint/releases/latest). ``` # macOS / Linux tar -xzf gomarklint_Darwin_x86_64.tar.gz sudo mv gomarklint /usr/local/bin/ # 或安装到用户本地目录(无需 sudo) mkdir -p ~/.local/bin && mv gomarklint ~/.local/bin/ ``` ``` # Windows (PowerShell) Expand-Archive -Path gomarklint_Windows_x86_64.zip -DestinationPath "$env:LOCALAPPDATA\Programs\gomarklint" # 添加到 PATH(运行一次) [Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";$env:LOCALAPPDATA\Programs\gomarklint", "User") ``` **Via Homebrew:** ``` brew install shinagawa-web/tap/gomarklint ``` **Via npm:** ``` npm install -g @shinagawa-web/gomarklint ``` **Via `go install`:** ``` go install github.com/shinagawa-web/gomarklint@latest ``` - 修复文档中的断链和标题问题。 - 强制执行可预测的结构(不再出现“H4 嵌套在 H2 下”的情况)。 - 提供对人类和机器都友好的输出(JSON 格式)。 - 处理 **100,000+ 行代码仅需约 170ms** —— 足够快以支持本地开发,也足够稳定用于 CI。 ## CI 集成 ### GitHub Actions ``` name: gomarklint on: push: pull_request: jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: shinagawa-web/gomarklint-action@v1 with: args: '.' ``` 完整选项和示例:[gomarklint-action](https://github.com/shinagawa-web/gomarklint-action) ### 预提交 将以下内容添加到你的 `.pre-commit-config.yaml`: ``` repos: - repo: https://github.com/shinagawa-web/gomarklint rev: v2.8.0 hooks: - id: gomarklint ``` ## 文档 完整文档请访问:[shinagawa-web.github.io/gomarklint](https://shinagawa-web.github.io/gomarklint/) - [快速开始](https://shinagawa-web.github.io/gomarklint/docs/quick-start/) - [规则](https://shinagawa-web.github.io/gomarklint/docs/rules/) - [CLI 参考](https://shinagawa-web.github.io/gomarklint/docs/cli/) - [配置](https://shinagawa-web.github.io/gomarklint/docs/configuration/) - [GitHub Actions 集成](https://shinagawa-web.github.io/gomarklint/docs/github-actions/) ## 贡献 欢迎提出问题、建议和 PR! 要求:Go `1.22+`(建议使用最新稳定版) ``` make test # unit tests make test-e2e # end-to-end tests make build # build binary ``` ### Git 钩子 安装预推送钩子,在推送前自动运行 lint 和单元测试: ``` make install-hooks ``` 如需临时绕过钩子: ``` git push --no-verify ``` ## 许可证 MIT License
标签:CLI, EVTX分析, Go, Golang, Homebrew, JSON, Linter, Markdown, npm, pptx, Ruby工具, SEO, WiFi技术, 云安全监控, 云计算, 可配置, 安全编程, 开源, 开源框架, 快速, 性能优化, 持续集成, 文档工具, 文档校验, 日志审计, 标题规范, 检测绕过, 结构化输出, 规则引擎, 链接检查, 静态分析