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:
parent
cdd2e4ce1c
commit
9cdb4d6b04
@ -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
|
||||
|
4
Makefile
4
Makefile
@ -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
2
cache/cache.go
vendored
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user