8000 GitHub - ecksun/githublinter
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ecksun/githublinter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lint github pull-requests

Say you have a new lint-rule you would like to introduce but turning on that linting for everything is infeasable because of the number of them. This tool allows you to only report linting issues in changes made by pull-requsts. That way you can ensure that the number of issues are decreasing over time without having to fix all instance of the issue at once.

Usage

export GITHUB_TOKEN="..."
export GIT_REPO=. # the path to the git repo the PR is part of
githublinter https://github.com/ecksun/githublinter/pull/1 ./lint.sh

Currently there is special syntax used by githublinter to annotate lints with metadata, for example if you are running multiple linters at once and want to have the name of the linter as part of the message in the pull-request.

That syntax is # githublinter: ${message}, for example you might have a lint file that looks like this:

#!/bin/sh

echo '# githublinter: go vet'
go vet 2>&1
echo '# githublinter: nakedret'
nakedret
echo '# githublinter: unimport'
unimport

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0