O Que É commitlint?
commitlint é um linter que valida mensagens de commit contra regras, tipicamente um formato de conventional commit, e falha quando uma mensagem não está em conformidade. Ele roda como um hook localmente ou como um check no CI. Impõe as mensagens de commit estruturadas das quais o versionamento automatizado e os changelogs dependem.
Por que importa
A automação de release que lê mensagens de commit só funciona se essas mensagens seguirem a convenção. commitlint impõe isso no momento do commit, de modo que o histórico permaneça parseável. Rodá-lo tanto como um hook local quanto como um check no CI detecta violações antes que elas cheguem à branch principal.
Where this shows up in a real pipeline
A definition is only useful if you can recognise the thing in your own logs. In practice this concept surfaces when a job behaves differently between a local run and a runner, which is where most CI debugging starts.
- Compare a local run against a CI run of the same command before assuming a tool is at fault.
- Runner environments differ in shell, PATH, TTY availability, available memory, and disk. Most CI-only behaviour traces to one of those five.
- Pin tool versions so an environment difference cannot be introduced by an unrelated update.