Skip to main content

Simple command line app for running Python linters.

Project description

👁 Voight-Kampff

This repository contains a small Python package, voight-kampff, which provides a command line application, vk, which can be used to run the following linters (including some spell checkers):

This can be useful to check your entire repository before pushing the code to the remote.

In case you are wondering about the name, it was inspired by a device used to determine whether an individual is a replicant in the 1982 movie, Blade Runner.

Prerequisites

Before you can use Voight-Kampff to run the linters, they need be installed. Some of the linters are written in Python and can be installed through pip. These are specified as dependencies of Voight-Kampff and will be installed automatically when you install the voight-kampff package. However, a few of the linters are Node.js-based and need to be installed using npm. Finally for the spell checking feature in Pylint to work, you need to have Enchant installed. That can be done through Homebrew or apt depending on your OS. Installation instructions for all dependencies on macOS as well as Debian, Ubuntu and similar are provided below.

Installing prerequisites on macOS

This section briefly describes how you can install the prerequisites on macOS. These instructions assume you already have Homebrew installed.

First you should install the prerequisites that are installed through Homebrew as follows:

brew install enchant
brew install node

The above lines will install Enchant and Node.js. Now that you have Node.js installed, you can install the linters that are based on Node.js:

npm install --global cspell
npm install --global markdownlint-cli2
npm install --global pyright

Installing prerequisites on Linux - Debian / Ubuntu

First you should install the prerequisites that are installed through apt as follows:

sudo apt install enchant-2
sudo apt install npm

The above lines will install Enchant and Node.js. Now that you have Node.js installed, you can install the linters that are based on Node.js:

sudo npm install --global cspell
sudo npm install --global markdownlint-cli2
sudo npm install --global pyright

Installation

Assuming you have the prerequisites installed as described above, you can install Voight-Kampff as follows:

pip3 install voight-kampff

Usage

To run all of the above linters on the current directory, simply run:

vk

If you want to run only one or a few specific linters, say Black and Pylint, you can do that as follows:

vk black pylint

By default, Voight-Kampff will keep running the subsequent linters if the current one fails the check. If you prefer that Voight-Kampff stops as soon as any linter fails, you can specify the --break-on-error flag -- or the short version, -B:

vk -B

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

voight-kampff-1.0.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

voight_kampff-1.0.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file voight-kampff-1.0.0.tar.gz.

File metadata

  • Download URL: voight-kampff-1.0.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for voight-kampff-1.0.0.tar.gz
Algorithm Hash digest
SHA256 28d8be939f9563ecc85279673ab2e5199feaa14d044c56a4577ac4e06546eac1
MD5 6b608ee66fb97bd56028bc9f84f6b867
BLAKE2b-256 1f641299d99da9aa0fcf7b279f0b97e5d3814671d641ed66fdd64eceb9f4b017

See more details on using hashes here.

File details

Details for the file voight_kampff-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for voight_kampff-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 804712a5ee4a0876188dc8d0d6e7dca0ce0bb8a71bdbe48886a30770a7c723bd
MD5 0c6b5b0e52a06db6ac17e88a4df2427e
BLAKE2b-256 8777e698320247a1b896f0ea59f86ffd08fb7a8400af14f97d4506fe0d9b89fb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page