Package: lintly
LintlyAutomated GitHub PR code reviewer for Python, JavaScript, CSS, and more.UsageFirst,pipinstall lintly:$ pip install lintlyLintly requires Python 2.7 or 3.4+.Next, set theLINTLY_API_KEYenvironment variable to your GitHub API Key:$ export LINTLY_API_KEY="12345"Finally, pipe the output of your linter to thelintlyscript:$ flake8 | lintlyNow you will see a review with linting errors......and a commit check......on your pull requests! Nifty! 🎉Supported Lintersflake8$ flake8 | lintly --format=flake8black$ black . --check 2>&1 >/dev/null | lintly --format=blackpylintFor pylint you must use thejsonoutput format.$ pylint . --output-format=json | lintly --format=pylint-jsoneslint$ eslint . | lintly --format=eslintstylelint$ stylelint . | lintly --format=stylelintcfn-lint$ cfn-lint template.yaml | lintly --format=cfn-lintcfn-nag$ cfn_nag_scan --input-path cloudformation-template.yaml --output-format=json | lintly --format=cfn-nagAdditional linters can be added by modifying thelintly/parsers.pymodule.ConfigurationAt a minimum Lintly needs to know the following information to determine how to post the correct GitHub PR Review:GitHub API key(--api-keyorLINTLY_API_KEYenv var)Generate your ownAPI Key here. The API key will need the following GitHub scopes:repo:statusso that Lintly can post commit statuses on PRs.public_reposo that Lintly can create pull request reviews on public repos.reposo that Lintly can create pull request reviews on private repos.GitHub repository(--repoorLINTLY_REPOenv var)This is your repository in the formatgrantmcconnaughey/lintly.Note: Most Continuous Integration platforms will provide this value automatically.Pull Request number(--prorLINTLY_PRenv var)Note: Most Continuous Integration platforms will provide this value automatically.These configuration values can be provided to Lintly via environment variables, discovered automatically when run in a supported CI platform,
or by being passed in as arguments to the Lintly CLI.OptionsA list of all configuration values can be viewed by runninglintly --help.Usage: lintly [OPTIONS]

  Slurp up linter output and send it to a GitHub PR review.

Options:
  --api-key TEXT                  The GitHub API key to use for commenting on
                                  PRs (required)
  --repo TEXT                     The GitHub repo name in the format
                                  {owner}/{repo}
  --pr TEXT                       The pull request number for this build
                                  (required)
  --commit-sha TEXT               The commit Lintly is running against
                                  (required)
  --format [unix|flake8|pylint-json|eslint|eslint-unix|stylelint|black|cfn-lint|cfn-nag]
                                  The linting output format Lintly should
                                  expect to receive. Default "flake8"
  --context TEXT                  Override the commit status context
  --fail-on [any|new]             Whether Lintly should fail if any violations
                                  are detected or only if new violations are
                                  detected. Default "any"
  --post-status / --no-post-status
                                  Used to determine if Lintly should post a PR
                                  status to GitHub. Default true
  --request-changes / --no-request-changes
                                  Whether Lintly should post violations as a
                                  PR request for changes instead of a comment
                                  review. Default true
  --use-checks / --no-use-checks  Whether Lintly should try to use the GitHub
                                  Checks API to report on changes requested.
                                  This only works when running as a GitHub
                                  App. Default false
  --log                           Send Lintly debug logs to the console.
                                  Default false
  --exit-zero / --no-exit-zero    Whether Lintly should exit with error code
                                  indicating amount of violations or not.
                                  Default false
  --help                          Show this message and exit.Supported Continuous Integration platformsLintly works out of the box with all of the CI platforms supported byci.py. To add support for new CI platforms create a PR to the ci.py repo.When using these Continuous Integration platforms the repository, pull request number, and commit SHA will be detected automatically.GitHub Actions exampleTo use Lintly with GitHub Actions, create a file called.github/workflows/lint.yamlwith the following contents:name:Linton:[pull_request]jobs:lint:runs-on:ubuntu-lateststeps:-uses:actions/checkout@v2-name:Set up Pythonuses:actions/setup-python@v2with:python-version:3.8-name:Install dependenciesrun:pip install flake8 lintly-name:Lint with flake8run:flake8 | lintlyenv:LINTLY_API_KEY:${{ secrets.GITHUB_TOKEN }}Travis CI exampleTo use with Lintly with Travis CI, add the following to your.travis.ymlconfig file:language: python

jobs:
  include:
    - stage: lint
      install: pip install lintly
      script: flake8 | lintly --format=flake8

stages:
  - lint