Skip to main content

Inline your lint messages

Project description

inline-plz

https://img.shields.io/pypi/v/inlineplz.svg https://img.shields.io/travis/guykisel/inline-plz.svg

Tired of reading through CI console logs to find your lint errors? Inline your lint messages in your diffs!

  • Free software: ISC license

Github webhook bot

Features

  • Run linters against your code and comment in your diffs at the failing lines

  • Automatically run linters with reasonable default configs

  • Easy to add new linter configurations

How to use

pip install inlineplz
inline-plz --install --autorun

You probably want to run the above in a CI job, not in your regular development environment.

You’ll also need to provide the following either in the command line or via environment variables:

  • owner: the repo organization/owner

  • repo: the repo name

  • token: your auth token (encrypt this, don’t put this in plaintext in any public configurations!)

  • url: the url of your scm host

  • interface: the type of scm host (such as github)

Dependencies:

  • node.js / npm

  • ruby / gem

  • python / pip

  • haskell / cabal

Configuration

Besides specifying options at the command line or in environment variables, you can also set them in a yaml file. You can create a file in the root of your repo named .inlineplz.yml

For example:

ignore_paths:
  - node_modules
  - .tox
  - .git
enabled_linters:
  - prospector
disabled_linters:
  - markdownlint
  - gherkin-lint

Known issues

  • Currently for Travis-CI usage, inline-plz only works for PRs within the original repo, not PRs from forks. This is because encrypted creds in Travis-CI configs are encrypted per repo, and cannot be decrypted in PRs from forks. You can work around this using the webhook bot at https://github.com/guykisel/inline-plz-bot

  • Currently the inline-plz console output can print out some misleading stack traces

  • Currently dependencies get installed globally unless you pre-create a virtualenv

  • Commits directly to master are not currently supported - only PRs get linted

Contribute

  • Report bugs/suggest features

  • Add/update docs

  • Add support for more linters

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.19.0 (2016-07-17)

  • Add out of date check

  • Config improvements

0.18.0 (2016-06-19)

  • Add gometalinter support

  • Catch index errors in some parsers

0.17.0 (2016-06-12)

  • Add –trusted flag for installs

  • Cleanup install dirs before run

0.16.1 (2016-06-08)

  • Fix path to markdownlint

0.16.0 (2016-06-05)

  • Run ‘bundle install’ during ruby gem installs

  • Replace ruby markdownlint with node.js markdownlint

  • Enable or disable linters in yaml

0.15.0 (2016-05-21)

  • Add bandit support

0.14.0 (2016-05-21)

  • Stringify error output

  • Use time.time instead of time.clock

  • Check github url

  • Add dockerfile_lint support

  • Add shellcheck support

  • Run prospector with optional extras

0.13.0 (2016-04-19)

  • Add support for gherkin-lint

  • Configure rflint to run per file

  • Set jscs autorun to False

  • Update eslint dotfiles

0.12.5 (2016-04-14)

  • Minor improvements to logging

  • Add explicit jscs dir exclusions

0.12.4 (2016-04-13)

  • Encode output to ascii and replace errors

0.12.3 (2016-04-13)

  • Don’t use unicode literals in setup.py

0.12.2 (2016-04-13)

  • Use unicode literals instead of decoding utf-8

  • Set npm progress=false

0.12.1 (2016-04-12)

  • Replace decode errors

0.12.0 (2016-04-12)

  • Log all install output

  • Set max comments per file in github interface

0.11.0 (2016-03-29)

  • Tell utf-8 encoder to replace errors

  • Robotframework lint support

0.10.1 (2016-03-16)

  • Fix .mdlrc syntax

0.10.0 (2016-03-15)

  • Improve performance

0.9.0 (2016-03-14)

  • Print installation and lint durations

0.8.2 (2016-03-11)

  • Remove bad whitespace from stylint dotfile name

0.8.1 (2016-03-11)

  • Detect yaml-lint install using just yaml-lint

0.8.0 (2016-02-29)

  • Add –config-dir arg

  • Add stylint support

  • Add default mdl config

0.7.5 (2016-02-22)

  • Quit early if no interface found

0.7.4 (2016-02-18)

  • Catch OSError during install

0.7.3 (2016-02-18)

  • Don’t re-run install commands

  • Better error handling

0.7.2 (2016-02-17)

  • Handle missing config file

0.7.1 (2016-02-17)

  • Load paths to ignore from yaml config

0.7.0 (2016-02-16)

  • Add jsonlint support

  • Add yaml-lint support

  • Fix running per file

  • Add restructuredtest-lint support

  • Add markdownlint support

0.6.0 (2016-02-12)

  • Only autorun if no dotfiles found for language

0.5.5 (2016-02-12)

  • Catch GitHubError

0.5.4 (2016-02-12)

  • Use os.walk instead of glob for file search

  • Normalize message paths before storing

0.5.3 (2016-02-12)

  • Include linter config files in MANIFEST.in

0.5.2 (2016-02-12)

  • Fix installed check

0.5.1 (2016-02-12)

  • Update deploy config

  • Better installation

0.5.0 (2016-02-11)

  • Unpin dependencies

  • Add autorun mode

  • Do a release on travis python version == 2.7

0.4.1 (2016-02-10)

  • Load owner and repo from ghprbPullLink

0.4.0 (2016-02-08)

  • Catch Exception on run

  • Prepend linter name to message content

0.3.2 (2016-02-05)

  • For js linters, just ‘npm install’

0.3.1 (2016-02-05)

  • Fix for jshint xml parsing

0.3.0 (2016-02-04)

  • Add –max-comments arg

0.2.0 (2016-02-04)

  • Disable running if not in a PR or if no Github is defined

0.1.1 (2016-02-03)

  • Initial release supporting prospector, jshint, eslint, jscs

0.1.0 (2015-12-13)

  • First release on PyPI.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

inlineplz-0.31.0.tar.gz (179.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inlineplz-0.31.0-py2.py3-none-any.whl (35.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file inlineplz-0.31.0.tar.gz.

File metadata

  • Download URL: inlineplz-0.31.0.tar.gz
  • Upload date:
  • Size: 179.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for inlineplz-0.31.0.tar.gz
Algorithm Hash digest
SHA256 b0c7062d6550bcc41422042c720291f340159eda7a11365aff18bb392be9731d
MD5 7030c3885a9b4062e2c9bae4211294ad
BLAKE2b-256 8a4aba741618e8dba09d12cdf15af66ce0d62cc775606ce11915068d30997e07

See more details on using hashes here.

File details

Details for the file inlineplz-0.31.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for inlineplz-0.31.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3dc32002e17398071e570195c5dfe755738a4fcaa0879d040b1a18a0f425d29d
MD5 f5f646ec9833028b0db5cedf49800b20
BLAKE2b-256 b21cab3cfcc5d1e9e1af8b5651503e8e2351a5e3f4f6c2a0940658f1f2b9710e

See more details on using hashes here.

Supported by

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