This code is adapted from the QEMU checkpatch.pl script. It can check
either a patch, a file or a git branch. It tries to warn about things
that I believe might be style(9) violations. It's experimental, since I
heavily hacked on the qemu version to get it to not complain (much)
about iconic code in the tree. At the moment, it's use should be
considered expermental. It will likely miss violations, and complain
about code that's perfectly fine. It's offered as an experiment
and to make it easier for contributors to submit patches.
Details
Details
not sure who else to share this with before I dump it into the tree...
It's designed to be a first order style checker. There's likely lots of things that are missing.
I just added return (foo) this morning :). But it will help both people landing commits
and people who submit patches to make sure we're at least close to style(9).
I likely should add a commit message checker too...
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 50365 Build 47256: arc lint + arc unit
Event Timeline
Comment Actions
I was planning on proposing —specifically for GitHub pull requests— to use their own Super-Linter, maybe submitting a mandoc linter as well.
It uses clang-format, however checkstyle9.pl is less aggressive than clang-format (and from a brief test, more accurate!). It also has the advantage that it can be used in almost any development setup. Nice!