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.30.1.tar.gz (180.6 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.30.1-py2.py3-none-any.whl (34.9 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for inlineplz-0.30.1.tar.gz
Algorithm Hash digest
SHA256 54f50da373323e34007546abae5aacc807ca9fc23ce98474681159049350b72d
MD5 d80792449e94b4ade1515720252f9698
BLAKE2b-256 a20a7e04986809705be5dadd2f1c20ddb0a58faefa12b4cd0a566ac09e5777c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for inlineplz-0.30.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 345ba95d34a57d24b4d6bbeee94d19f2ce358da8afc3dd6357e1c65174a6d95c
MD5 0b97f6f7912169eca27b9d6cef8cbf93
BLAKE2b-256 bf9e568c6e35becbdef008b86237e388f14f538f3f5785cfb9c21c54a2e0be5e

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