Git Product home page Git Product logo

linty_fresh's Introduction

✨ Linty Fresh ✨ Build Status Join the chat at https://gitter.im/lyft/linty_fresh

Keep your codebase sparkly clean with the power of LINT!

Linty Fresh parses lint errors and report them back to GitHub as comments on a pull request.

Linty Fresh

Requirements

Contributing

CONTRIBUTING.md

Installation

Linty Fresh is hosted in PyPi. To get started, Run

pip3 install linty-fresh

Install from source

Linty Fresh uses setuptools for installation. After cloning the repo, run

python3 setup.py install

Usage

We recommend you create a GitHub user for your organization used just for commenting on PRs. Create a token for that user that only has access to the repo scope (or public_repo scope for OSS projects). Then add that token as a secret to your CI system as the environment variable GITHUB_AUTH_TOKEN. You should ensure this user and it's token are scoped down as much as possible. You should assume that anyone who has permissions to run a job in your CI system would have access to this token. See Travis CI documentation storing encrypted secrets for more information.

If you are looking for a good secret management system to store secrets like this, check out Confidant.

Once you have your GitHub user, integrating Linty Fresh is easy! Assuming you are running PyLint and the output is going to pylint.txt, add the following snippet to the bottom of your automation script.

linty_fresh --pr_url ${PR_URL} --commit "${COMMIT}" \
            --linter pylint pylint.txt

Take a look at our run_tests.sh script as an example for how this works on Travis CI.

Currently each invocation of linty_fresh can only accept one lint file, but this will likely change.

Supported Linters

linty_fresh's People

Contributors

apallin avatar bartek avatar gitter-badger avatar jonprindiville avatar kastiglione avatar keith avatar orta avatar paulaladdin avatar readmecritic avatar rowillia avatar ryan-lane avatar tildedave avatar twidi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linty_fresh's Issues

Support parsing Infer output

http://fbinfer.com/ is a great static analyzer for finding bugs. We should support parsing it's output.

For example:

./Root/Hello.java:27: error: NULL_DEREFERENCE
  object a last assigned on line 25 could be null and is dereferenced at line 27

./Root/Hello.java:37: error: RESOURCE_LEAK
   resource acquired to stream by call to allocateResource() at line 31 is not released after line 37

See https://github.com/lyft/linty_fresh/blob/master/CONTRIBUTING.md for more information on how to get started.

Delete comments on re-run

Would it make sense to delete all existing linty_fresh comments when making new ones? Sometimes these comments are folded, depending on the linter, but they're also sometimes not, or at the top level which makes it hard to tell if the comment has been addressed.

I don't feel like these automated lint comments add a ton of historical value so if re-running the linter has the capability of making the same comments, if the issues haven't been addressed, it seems like we would be safe first clearing the existing ones.

Bitbucket Support

Is there any way we can do the same with bitbucket? I tried and it is showing that PR URL doesn't appear to be a valid github pr url.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.