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.1.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.1-py2.py3-none-any.whl (35.2 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for inlineplz-0.31.1.tar.gz
Algorithm Hash digest
SHA256 c79d290f582773d9e96af062ac35aba83d9fdeab24f5a39f7f61ce3248d80ff1
MD5 b8dfe05ed881ff8efda123c0e6e38ea0
BLAKE2b-256 af96aa3140f213c0917cc6121a924618f023b1e8e7e09a2a573758d085dce378

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for inlineplz-0.31.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ef5fc48c71b23b3f9e0fea4892d84b70828262be126dcdf71c010532cc6d4494
MD5 4ad253fdab91efc6ee39b7df6fbdd9ac
BLAKE2b-256 351b68af216bcd0aff66c7a7d09b68b8ef454234030d8389795975c603ec62f1

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