mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 01:31:17 +00:00
Squashed 'tools/' changes from 954b023..c342e83
c342e83Merge pull request #17 from weaveworks/lint-ignore07ebcffUpdate to ignore node_modules and *.generated.god76a90aDon't lint codecgen'd code.cbb0567Exclude ALL_CAPS warnings from linter git-subtree-dir: tools git-subtree-split:c342e833bb
This commit is contained in:
4
lint
4
lint
@@ -85,7 +85,7 @@ function lint_go {
|
||||
if [ -z "$IGNORE_LINT_COMMENT" ]; then
|
||||
lintoutput=$(golint "${filename}")
|
||||
else
|
||||
lintoutput=$(golint "${filename}" | grep -vE 'comment|dot imports')
|
||||
lintoutput=$(golint "${filename}" | grep -vE 'comment|dot imports|ALL_CAPS')
|
||||
fi
|
||||
if [ -n "$lintoutput" ]; then
|
||||
lint_result=1
|
||||
@@ -148,7 +148,7 @@ function lint_files {
|
||||
|
||||
function list_files {
|
||||
if [ $# -gt 0 ]; then
|
||||
find "$@" -type f | grep -vE '(^\./\.git|^\./\.pkg|/vendor/)'
|
||||
find "$@" -type f | grep -vE '(^\./\.git|^\./\.pkg|/vendor/|/node_modules/|\.codecgen\.go$|\.generated\.go$)'
|
||||
else
|
||||
git diff --cached --name-only
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user