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-cli
  - gherkin-lint

For more see the examples folder in the repo.

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.42.3.tar.gz (58.9 MB view details)

Uploaded Source

Built Distribution

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

inlineplz-0.42.3-py2.py3-none-any.whl (59.0 MB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: inlineplz-0.42.3.tar.gz
  • Upload date:
  • Size: 58.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3

File hashes

Hashes for inlineplz-0.42.3.tar.gz
Algorithm Hash digest
SHA256 e822f7067c8f61160ee2cbe1d52275da55ce31eeae6c14c01ec7fbe7b06cb5a9
MD5 feed27932ab4ca553aaa488353403d7d
BLAKE2b-256 a427cb3a625add7cab8108a2b2a1a95b0064811dead695b1590ab8da2f373722

See more details on using hashes here.

File details

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

File metadata

  • Download URL: inlineplz-0.42.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 59.0 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3

File hashes

Hashes for inlineplz-0.42.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 19a9e85f77faa2f7339c4f0cde5d35d453aedd2045ed98593253be3a82ff242e
MD5 a654917b6c9d3a66524c7cf768ed8072
BLAKE2b-256 3ff73189604eaee0d4cb5fef4a48ba99f153dedf841a170f58bf7234b428d43a

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