1
0
mirror of https://github.com/danog/gojekyll.git synced 2024-11-26 21:24:41 +01:00

Replace gometalinter -> golangci-lint

This commit is contained in:
Oliver Steele 2021-06-16 15:48:07 +08:00
parent cdd2e4ce1c
commit 9cdb4d6b04
4 changed files with 8 additions and 6 deletions

View File

@ -15,7 +15,8 @@ If you choose to contribute code, please review the [pull request template](http
Fork and clone the repo.
[Install go](https://golang.org/doc/install#install). On macOS running Homebrew, `brew install go` is easier than the linked instructions.
[Install go](https://golang.org/doc/install#install). On macOS running Homebrew,
`brew install go` is easier than the linked instructions.
Install package dependencies and development tools:
@ -24,6 +25,9 @@ make setup
go get -t ./...
```
[Install golangci-lint](https://golangci-lint.run/usage/install/#local-installation).
On macOS: `brew install golangci-lint`
### Test and Lint
```bash

View File

@ -38,14 +38,12 @@ release: build
setup:
go mod init || true
go get -t -u ./...
go get github.com/alecthomas/gometalinter
gometalinter --install
install:
go install ${LDFLAGS} ${PACKAGE}
lint:
gometalinter ./... --tests --deadline=5m --disable=gotype --disable=aligncheck
golangci-lint run
test:
go test ./...

2
cache/cache.go vendored
View File

@ -46,7 +46,7 @@ func Disable() {
// header and content are distinct parameters to relieve the caller from
// having to concatenate them.
func WithFile(header string, content string, fn func() (string, error)) (string, error) {
h := md5.New() // nolint: gas, noncrypto
h := md5.New() // nolint: gas
io.WriteString(h, content) // nolint: errcheck, gas
io.WriteString(h, "\n") // nolint: errcheck, gas
io.WriteString(h, header) // nolint: errcheck, gas

View File

@ -30,7 +30,7 @@ func (p *Manager) copySASSFileIncludes() error {
if err := p.makeSASSTempDir(); err != nil {
return err
}
h := md5.New() // nolint: gas, noncrypto
h := md5.New() // nolint: gas
if p.ThemeDir != "" {
if err := p.copySASSFiles(filepath.Join(p.ThemeDir, sassDirName), p.sassTempDir, h); err != nil {
return err