Skip to content

Commit d4dd72d

Browse files
refactor(config)!: rename GetLinter to NewLinter
1 parent 5a6fbaa commit d4dd72d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

config/default_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
)
88

99
func TestDefaultLint(t *testing.T) {
10-
_, err := GetLinter(defConf)
10+
_, err := NewLinter(defConf)
1111
if err != nil {
1212
t.Error("default lint creation failed", err)
1313
return

config/lint.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"github.com/conventionalcommit/commitlint/lint"
88
)
99

10-
// GetLinter returns Linter for given confFilePath
11-
func GetLinter(conf *lint.Config) (*lint.Linter, error) {
10+
// NewLinter returns Linter for given confFilePath
11+
func NewLinter(conf *lint.Config) (*lint.Linter, error) {
1212
err := checkIfMinVersion(conf.MinVersion)
1313
if err != nil {
1414
return nil, err

internal/cmd/lint.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func getLinter(confParam string) (*lint.Linter, lint.Formatter, error) {
4242
return nil, nil, err
4343
}
4444

45-
linter, err := config.GetLinter(conf)
45+
linter, err := config.NewLinter(conf)
4646
if err != nil {
4747
return nil, nil, err
4848
}

0 commit comments

Comments
 (0)