SBLint is a linter for Common Lisp source code using SBCL.
sblint command in your project directory, then it loads all ASD files and runs lint for all CL source files of those.
$ sblint -h Usage: $ sblint # runs on all ASD files in current directory $ sblint [directories or files...]
As SBLint requires SBCL, make sure it is installed via Roswell:
$ ros install sbcl # if it's already installed $ ros use sbcl
$ ros install cxxxr/sblint
Using with reviewdog
reviewdog is an automated code review tool which provides a way to see review comments of diff before publishing it.
$ sblint | reviewdog -efm="%f:%l:%c: %m" -diff="git diff master"
Run before 'git commit'
It can be done by using git-hook's pre-commit. Just add the following script to
#!/bin/sh # Copy this file to ./.git/hooks/pre-commit if [ -z "$(which sblint)" ]; then echo "WARNING! sblint not found. Given up to run it." exit 0 fi error_count=$(sblint | wc -l | tr -d '[[:space:]]') if [ "$error_count" -gt "0" ]; then echo "Failed to commit because $error_count errors are found by SBLint." exit 1 fi
- Eitaro Fukamachi (email@example.com)
Copyright (c) 2016 Eitaro Fukamachi (firstname.lastname@example.org)
Licensed under the BSD 2-Clause License.