Skip to content

Commit 1f814d6

Browse files
authored
chore: add fmt target to makefile and fix linting (#107)
Just adds the `fmt` target to Makefile and fixes a linting issue (that it's not showing now because linter version in here is old but once we bump to latest, will show)
1 parent 662d17d commit 1f814d6

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Makefile

+8
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ lint:
2626
@golangci-lint run
2727
.PHONY: lint
2828

29+
## fmt: Format files per linters golangci-lint and markdownlint.
30+
fmt:
31+
@echo "--> Running golangci-lint --fix"
32+
@golangci-lint run --fix
33+
@echo "--> Running markdownlint --fix"
34+
@markdownlint --fix --quiet --config .markdownlint.yaml .
35+
.PHONY: fmt
36+
2937
## test: Run unit tests.
3038
test:
3139
@echo "--> Run unit tests"

share/share_builder_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package share
22

33
import (
44
"bytes"
5-
"fmt"
65
"testing"
76

87
"github.com/stretchr/testify/assert"
@@ -298,7 +297,7 @@ func TestShareBuilderImportRawData(t *testing.T) {
298297
rawData := builtShare.RawData()
299298
// Since rawData has padding, we need to use contains
300299
if !bytes.Contains(rawData, tc.want) {
301-
t.Errorf(fmt.Sprintf("%#v does not contain %#v", rawData, tc.want))
300+
t.Errorf("%#v does not contain %#v", rawData, tc.want)
302301
}
303302
})
304303
}

0 commit comments

Comments
 (0)