aboutsummaryrefslogtreecommitdiffhomepage
path: root/GNUmakefile
diff options
context:
space:
mode:
authordkegel-fastly <[email protected]>2024-04-22 11:10:13 -0700
committerGitHub <[email protected]>2024-04-22 11:10:13 -0700
commit3d433fe9f15dc6cff400ce7fd03cf15ad55f64fc (patch)
tree3e4f853cb177ccb0cc4788eed8dc28a823ab4ddf /GNUmakefile
parent1154212c15e6e97048e122068730dab5a1a9427f (diff)
downloadtinygo-3d433fe9f15dc6cff400ce7fd03cf15ad55f64fc.tar.gz
tinygo-3d433fe9f15dc6cff400ce7fd03cf15ad55f64fc.zip
Lint: lint and fix src/{os,reflect} (#4228)
* lint: expand to src/{os,reflect}, fix or suppress what it found * internal/tools/tools.go: the tools idiom requires a build tag guard to avoid go test complaints
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/GNUmakefile b/GNUmakefile
index c15b7724d..8987fcaa5 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -915,7 +915,9 @@ deb: build/release
endif
lint:
- # Only run on compiler dir for now, expand as we clean up other dirs
- # This obviously won't scale, but it's a start, and it's fast
- go run github.com/mgechev/revive --version
- go run github.com/mgechev/revive --config revive.toml compiler/...
+ go run github.com/mgechev/revive -version
+ # TODO: lint more directories!
+ # revive.toml isn't flexible enough to filter out just one kind of error from a checker, so do it with grep here.
+ # Can't use grep with friendly formatter. Plain output isn't too bad, though.
+ # Use 'grep .' to get rid of stray blank line
+ go run github.com/mgechev/revive -config revive.toml compiler/... src/{os,reflect}/*.go | grep -v "should have comment or be unexported" | grep '.' | awk '{print}; END {exit NR>0}'