Skip to content

Commit c3802dc

Browse files
authored
Use binary version of revive linter (go-gitea#15739)
Use the common `go get` method to install and run the revive linter, removing the useless build/lint.go and related vendor libraries.
1 parent a69fb52 commit c3802dc

File tree

122 files changed

+7
-13734
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+7
-13734
lines changed

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,10 @@ errcheck:
282282

283283
.PHONY: revive
284284
revive:
285-
GO111MODULE=on $(GO) run -mod=vendor build/lint.go -config .revive.toml -exclude=./vendor/... ./... || exit 1
285+
@hash revive > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
286+
GO111MODULE=off $(GO) get -u github.com/mgechev/revive; \
287+
fi
288+
@revive -config .revive.toml -exclude=./vendor/... ./...
286289

287290
.PHONY: misspell-check
288291
misspell-check:

build.go

-8
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@ package main
1010
// These libraries will not be included in a normal compilation.
1111

1212
import (
13-
// for lint
14-
_ "github.com/mgechev/dots"
15-
_ "github.com/mgechev/revive/formatter"
16-
_ "github.com/mgechev/revive/lint"
17-
_ "github.com/mgechev/revive/rule"
18-
_ "github.com/mitchellh/go-homedir"
19-
_ "github.com/pelletier/go-toml"
20-
2113
// for embed
2214
_ "github.com/shurcooL/vfsgen"
2315

build/lint.go

-325
This file was deleted.

go.mod

+2-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ require (
2222
github.com/boombuler/barcode v1.0.1 // indirect
2323
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b // indirect
2424
github.com/caddyserver/certmagic v0.13.0
25-
github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af // indirect
2625
github.com/chi-middleware/proxy v1.1.1
2726
github.com/couchbase/go-couchbase v0.0.0-20210224140812-5740cd35f448 // indirect
2827
github.com/couchbase/gomemcached v0.1.2 // indirect
@@ -74,22 +73,20 @@ require (
7473
github.com/mattn/go-isatty v0.0.12
7574
github.com/mattn/go-runewidth v0.0.12 // indirect
7675
github.com/mattn/go-sqlite3 v1.14.7
77-
github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81
78-
github.com/mgechev/revive v1.0.6
7976
github.com/mholt/archiver/v3 v3.5.0
8077
github.com/microcosm-cc/bluemonday v1.0.8
8178
github.com/miekg/dns v1.1.40 // indirect
8279
github.com/minio/md5-simd v1.1.2 // indirect
8380
github.com/minio/minio-go/v7 v7.0.10
8481
github.com/minio/sha256-simd v1.0.0 // indirect
85-
github.com/mitchellh/go-homedir v1.1.0
8682
github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 // indirect
8783
github.com/msteinert/pam v0.0.0-20201130170657-e61372126161
8884
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
8985
github.com/niklasfasching/go-org v1.5.0
86+
github.com/olekukonko/tablewriter v0.0.5 // indirect
9087
github.com/oliamb/cutter v0.2.2
9188
github.com/olivere/elastic/v7 v7.0.24
92-
github.com/pelletier/go-toml v1.9.0
89+
github.com/pelletier/go-toml v1.9.0 // indirect
9390
github.com/pierrec/lz4/v4 v4.1.3 // indirect
9491
github.com/pkg/errors v0.9.1
9592
github.com/pquerna/otp v1.3.0

0 commit comments

Comments
 (0)