Skip to content

One command to run multiple linters under Git version control

License

Notifications You must be signed in to change notification settings

totakke/bosslint

Repository files navigation

Bosslint

build release

One command to run multiple linters under Git version control

Good health is the most important thing. More than success, more than money, more than power.

— Hyman Roth / The Godfather Part II

Installation

Brew (MacOS and Linux)

brew install totakke/tap/bosslint

Manual install

OS & arch:

  • os:
    • Mac OS - macos
    • Linux - linux
  • arch:
    • amd64 / x86_64 - amd64
    • aarch64 / arm64 - aarch64

Download & install:

curl -sSL https://github.com/totakke/bosslint/releases/download/v0.5.0/bosslint_[os]_[arch] -o bosslint
chmod +x bosslint
mv bosslint [/your/PATH/dir/]

Build

To build Bosslint yourself, you must install Clojure CLI tools, GraalVM and GraalVM's native-image. Additionally, GRAALVM_HOME environment variable must be set.

$ clojure -M:native-image
Compiling bosslint.main
 ...
Finished generating 'bosslint' in 17.8s.
$ mv bosslint [/your/PATH/dir/]

Usage

Basics

Bosslint collects changed files under Git version control and checks them with appropriate linters.

$ bosslint check HEAD~1
clj-kondo:
linting took 281ms, errors: 0, warnings: 0
==> Success ✅

cljfmt:
All source files formatted correctly
==> Success ✅

eastwood:
...
== Linting done in 1887 ms ==
== Warnings: 0 (not including reflection warnings)  Exceptions thrown: 0
==> Success ✅

Use :all to check all files under a Git project.

bosslint check :all

Bosslint does not contain any linters themselves. You have to install the supported linters preliminarily.

Configuration

Bosslint implicitly loads ~/.bosslint/config.edn file.

Alternatively, you can specify a configuration file with --config option.

bosslint check --config [/path/to/config.edn] master

Look at the configuration example.

Supported Linters

Linter Bosslint linter name
Checkstyle checkstyle
clj-kondo clj-kondo
cljfmt cljfmt
dartanalyzer dartanalyzer
Eastwood eastwood
Flake8 flake8
hadolint hadolint
jsonlint jsonlint
kubeval kubeval
markdownlint-cli markdownlint
sql-lint sql-lint
stylelint stylelint
SwiftLint swiftlint
tflint tflint
yamllint yamllint

License

Copyright © 2020 Toshiki Takeuchi

This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version, with the GNU Classpath Exception which is available at https://www.gnu.org/software/classpath/license.html.

About

One command to run multiple linters under Git version control

Topics

Resources

License

Stars

Watchers

Forks