/sylver-cli

Primary LanguageRustGNU Affero General Public License v3.0AGPL-3.0

Sylver logo

Multi-language programmable linter

Hashnode Discord Twitter codecov

Installation

Binary releases

curl -s https://sylver.dev/install.sh | bash

From source

Sylver is written in Rust, so you need to have the Rust toolchain installed. You can install it from rustup. To build sylver:

git clone https://github.com/sylver-dev/sylver-cli.git
cd sylver-cli 
cargo build --release

Running your first analysis

Python

The following command will download the python_base, python_comprehensions and python_bugbear rulesets and run them on all the Python files in the current directory (and subdirectories):

sylver ruleset run \
  --files="**/*.py"\
  --rulesets="https://github.com/sylver-dev/rulesets#python_base.yaml"\
  --rulesets="https://github.com/sylver-dev/rulesets#python_comprehensions.yaml"\
  --rulesets="https://github.com/sylver-dev/rulesets#python_bugbear.yaml"

Javascript

The following command will download the javascript_base, ruleset and run it on all the Javascript files in the current directory (and subdirectories):

sylver ruleset run \
  --files="**/*.js"\
  --rulesets="https://github.com/sylver-dev/rulesets#javascript_base.yaml"

Writing your own rulesets