chore: format using gofimports
parent
e7feb0ccf9
commit
fca04f788b
10
Makefile
10
Makefile
|
@ -1,6 +1,6 @@
|
||||||
.PHONY: all test test-color coverage coverage-cli coverate-html lint build
|
.PHONY: all test test-color coverage coverage-cli coverate-html lint format build
|
||||||
|
|
||||||
all: test-color lint
|
all: test-color lint format
|
||||||
go mod tidy
|
go mod tidy
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
@ -22,5 +22,11 @@ coverage-html: coverage
|
||||||
lint:
|
lint:
|
||||||
golangci-lint run ./...
|
golangci-lint run ./...
|
||||||
|
|
||||||
|
format:
|
||||||
|
go install github.com/haunt98/gofimports/cmd/gofimports@latest
|
||||||
|
go install mvdan.cc/gofumpt@latest
|
||||||
|
gofimports -w -company github.com/make-go-great .
|
||||||
|
gofumpt -w -extra .
|
||||||
|
|
||||||
build:
|
build:
|
||||||
go build -o changeloguru-dev ./cmd/changeloguru
|
go build -o changeloguru-dev ./cmd/changeloguru
|
||||||
|
|
|
@ -3,8 +3,9 @@ package changelog
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/haunt98/changeloguru/internal/convention"
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
|
"github.com/haunt98/changeloguru/internal/convention"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestFilter(t *testing.T) {
|
func TestFilter(t *testing.T) {
|
||||||
|
|
|
@ -4,8 +4,9 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/haunt98/changeloguru/internal/convention"
|
|
||||||
"github.com/make-go-great/markdown-go"
|
"github.com/make-go-great/markdown-go"
|
||||||
|
|
||||||
|
"github.com/haunt98/changeloguru/internal/convention"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -4,9 +4,11 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/haunt98/changeloguru/internal/convention"
|
|
||||||
"github.com/make-go-great/markdown-go"
|
|
||||||
"github.com/sebdah/goldie/v2"
|
"github.com/sebdah/goldie/v2"
|
||||||
|
|
||||||
|
"github.com/make-go-great/markdown-go"
|
||||||
|
|
||||||
|
"github.com/haunt98/changeloguru/internal/convention"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGenerateMarkdown(t *testing.T) {
|
func TestGenerateMarkdown(t *testing.T) {
|
||||||
|
|
|
@ -4,8 +4,9 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/haunt98/changeloguru/internal/convention"
|
|
||||||
"github.com/make-go-great/rst-go"
|
"github.com/make-go-great/rst-go"
|
||||||
|
|
||||||
|
"github.com/haunt98/changeloguru/internal/convention"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GenerateRST base on GenerateMarkdown
|
// GenerateRST base on GenerateMarkdown
|
||||||
|
|
|
@ -4,9 +4,11 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/haunt98/changeloguru/internal/convention"
|
|
||||||
"github.com/make-go-great/rst-go"
|
|
||||||
"github.com/sebdah/goldie/v2"
|
"github.com/sebdah/goldie/v2"
|
||||||
|
|
||||||
|
"github.com/make-go-great/rst-go"
|
||||||
|
|
||||||
|
"github.com/haunt98/changeloguru/internal/convention"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGenerateRST(t *testing.T) {
|
func TestGenerateRST(t *testing.T) {
|
||||||
|
|
|
@ -9,16 +9,18 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/haunt98/changeloguru/internal/changelog"
|
|
||||||
"github.com/haunt98/changeloguru/internal/convention"
|
|
||||||
"github.com/haunt98/changeloguru/internal/git"
|
|
||||||
"github.com/make-go-great/ioe-go"
|
|
||||||
"github.com/make-go-great/markdown-go"
|
|
||||||
"github.com/make-go-great/rst-go"
|
|
||||||
"github.com/pkg/diff"
|
"github.com/pkg/diff"
|
||||||
"github.com/pkg/diff/write"
|
"github.com/pkg/diff/write"
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
"golang.org/x/mod/semver"
|
"golang.org/x/mod/semver"
|
||||||
|
|
||||||
|
"github.com/make-go-great/ioe-go"
|
||||||
|
"github.com/make-go-great/markdown-go"
|
||||||
|
"github.com/make-go-great/rst-go"
|
||||||
|
|
||||||
|
"github.com/haunt98/changeloguru/internal/changelog"
|
||||||
|
"github.com/haunt98/changeloguru/internal/convention"
|
||||||
|
"github.com/haunt98/changeloguru/internal/git"
|
||||||
)
|
)
|
||||||
|
|
||||||
const autoCommitMessageTemplate = "chore(changelog): generate %s"
|
const autoCommitMessageTemplate = "chore(changelog): generate %s"
|
||||||
|
|
|
@ -3,8 +3,9 @@ package cli
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/make-go-great/color-go"
|
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
|
|
||||||
|
"github.com/make-go-great/color-go"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -4,9 +4,10 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/haunt98/changeloguru/internal/git"
|
|
||||||
"github.com/sebdah/goldie/v2"
|
"github.com/sebdah/goldie/v2"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
|
"github.com/haunt98/changeloguru/internal/git"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNewCommit(t *testing.T) {
|
func TestNewCommit(t *testing.T) {
|
||||||
|
|
|
@ -7,8 +7,9 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/haunt98/changeloguru/internal/git"
|
|
||||||
"github.com/make-go-great/date-go"
|
"github.com/make-go-great/date-go"
|
||||||
|
|
||||||
|
"github.com/haunt98/changeloguru/internal/git"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
Loading…
Reference in New Issue