Skip to content
Automated linting of pull requests.
Ruby CSS CoffeeScript HTML Elixir JavaScript Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Lintron repo permissions (#307) Nov 26, 2019
bin config travis to deploy to harbor instead of deis Jun 21, 2019
config Lintron repo permissions (#307) Nov 26, 2019
db fix: Hide repos that the user cannot see in the API (#304) Nov 20, 2019
fixtures/vcr_cassettes chore: Use VCR so we do not hit live GitHub API from Travis Oct 17, 2018
lib fix: Handle when a PR is a 404 in update:merge_status (#303) Nov 18, 2019
log initial github data structures May 3, 2015
public pushing implementations achieved on monday november 14th, implementat… Nov 15, 2016
scripts Track PRs in database May 24, 2017
spec fix: Hide repos that the user cannot see in the API (#304) Nov 20, 2019
src feat: Add text linting via write good (#208) Apr 2, 2019
vendor/assets initial github data structures May 3, 2015
.buildpacks fix: Add missing buildpacks to buildpack file Jun 27, 2018
.credo.exs Update Credo to 1.0 (#204) Mar 25, 2019
.dockerignore put .dockerignore back, remove a bunch of layers from dockerfile Jun 18, 2019
.eslintrc chore: Remove unknown rule from eslint Jul 15, 2019
.gitignore Add mix.exs and mix.lock with credo as dep Nov 9, 2017
.jscsrc add js linters May 5, 2015
.jshintrc turn off undef warnings May 21, 2015
.linty_rc Make gem on lintron executable Sep 16, 2016
.node-version Update eslint and kill old JS linters Sep 8, 2016
.rubocop.yml chore: Update dependencies (#236) Jun 10, 2019
.ruby-version Create local linty Sep 15, 2016
.scss-lint.yml fix: Set nesting depth and shorthand length (#128) (#130) Oct 24, 2018
.tool-versions Fix ESLint errors and catch similar issues next time (#231) Jun 5, 2019
.travis.yml chore: Try a different approach to docker login Jul 15, 2019
960px-Webhook3.png Add webhook png for readme Jun 28, 2016
Dockerfile formatting, change up CMD so that it works properly and is more legible Jun 20, 2019
Gemfile fix: Address CVE-2019-16109 (#286) Sep 30, 2019
Gemfile.lock fix: Address CVE-2019-16109 (#286) Sep 30, 2019
LICENSE Update copyright and authorship statements Oct 3, 2017
Pipfile chore: Add Pipfile Dec 21, 2018
Pipfile.lock chore: Change version in Pipfile.lock Dec 21, 2018
Procfile Switch to puma Sep 14, 2015
Rakefile initial github data structures May 3, 2015
Readme.md fix: Fix URL for coverage badge Oct 22, 2018
brakeman.yml add brakeman support May 8, 2015
coffeelint.json add coffeelint May 6, 2015
config.ru initial github data structures May 3, 2015
example.png Add screenshot Jun 28, 2016
lintron.gemspec chore(deps): Update httparty requirement from >= 0.14, < 0.17 to >= 0… Apr 23, 2019
mix.exs Update Credo to 1.0 (#204) Mar 25, 2019
mix.lock Update Credo to 1.0 (#204) Mar 25, 2019
package-lock.json fix: Update eslint and eslint-utils for CVE-2019-15657 Sep 3, 2019
package.json fix: Update eslint and eslint-utils for CVE-2019-15657 Sep 3, 2019
pull-request-checklist.md Add Pull Request Checklist Apr 12, 2016
pylintrc Add pylint May 10, 2017
requirements.txt Add pylint May 10, 2017

Readme.md

Lintron

Build Status Coverage Status

Automatically lints Github Pull Requests and posts lints as review comments.

Example Comment

Setup

bundle install

Lintron uses a GitHub machine user to make the comments. You just set up a separate user for it and set up a new developer application for that user. Then, you will need a .env file containing to the following keys:

GITHUB_USERNAME=…from the github user
GITHUB_TOKEN=…from the github user
GITHUB_WEBHOOK_SECRET=…make up a secret shared between lintron and github
GITHUB_APP_ID=…the developer application's id
GITHUB_APP_SECRET=…the developer application's secret

Linter Configuration

To override linter settings, use the configuration file for the linter. For global settings (across all projects), override the files at the root of the Lintron application. For project specific settings, Lintron will respect configurations placed at the root of your repo.

Setting Up Webhooks

Lintron uses webhooks to know when a PR has been created or updated. You'll need to set up the webhook on each repo you want Lintron to monitor.

Log into your Lintron instance with your GitHub credentials. You will be taken to a page (/hooks) where you can attach Lintron's required hooks to a repo.

Alternatively, you can set up the webhooks manually:

Webhooks

The webhook url will be https://yourlintronhost/github_webhooks. The secret will be the one you set in your .env file. Lintron needs to be on a publicly reachable host to receive webhooks.

Local CLI

gem install lintron

You must create a .linty_rc file like:

{
  "base_branch": "origin/master",
  "base_url": "URL_OF_YOUR_LINTRON"
}

Then you can run lintron or lintron --watch

Copyright

Copyright (c) 2016 Robert Prehn and Revelry Labs

You can’t perform that action at this time.