← 全部工具

lintje/lintje

热度 65 更新于 开发与构建

Lintje is an opinionated linter for Git.

githubauto-collected

安装

暂未验证可直接使用的安装命令,请查看项目官方文档或 Release。

Lintje

<div align="center" <b<a href="https://lintje.dev"Lintje.dev website</a</b </div

---

Lintje is an opinionated linter for Git. It lints commit messages based on a preconfigured set of [rules][rules] focussed on promoting communication between people. The idea is to write commits meant for other people reading them during reviews and debug sessions 2+ months from now.

  • No configuration. Don't spend time configuring your Git commit linter and

instead adopt a preconfigured set of [rules][rules].

  • Portable. Lintje is a Rust project built for several

Operating Systems and has no dependencies. Drop it into your project and it works.

Documentation

Visit [Lintje.dev][website] for more information about Lintje, and the Lintje documentation.

  • Installation
  • [Usage][usage]
  • Git hook
  • Git alias
  • [Rules documentation][rules]
  • Configuration
  • Getting help
  • Development documentation

Example

Given the last commit in a project is this:

Fix bug

When running lintje to lint the last commit, the output will be:

$ lintje
Error[SubjectCliche]: The subject does not explain the change in much detail
  9a2ae29:1:1: Fix bug
    |
  1 | Fix bug
    | ^^^^^^^ Describe the change in more detail

Error[MessagePresence]: No message body was found
  9a2ae29:3:1: Fix bug
    |
  1 | Fix bug
  2 |

| ^ Add a message body with context about the change and why it was made