Skip to content

Commit

Permalink
refactor(config)!: rename GetLinter to NewLinter
Browse files Browse the repository at this point in the history
  • Loading branch information
muthukrishnan24 committed Jan 31, 2022
1 parent 5a6fbaa commit d4dd72d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

func TestDefaultLint(t *testing.T) {
_, err := GetLinter(defConf)
_, err := NewLinter(defConf)
if err != nil {
t.Error("default lint creation failed", err)
return
Expand Down
4 changes: 2 additions & 2 deletions config/lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/conventionalcommit/commitlint/lint"
)

// GetLinter returns Linter for given confFilePath
func GetLinter(conf *lint.Config) (*lint.Linter, error) {
// NewLinter returns Linter for given confFilePath
func NewLinter(conf *lint.Config) (*lint.Linter, error) {
err := checkIfMinVersion(conf.MinVersion)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func getLinter(confParam string) (*lint.Linter, lint.Formatter, error) {
return nil, nil, err
}

linter, err := config.GetLinter(conf)
linter, err := config.NewLinter(conf)
if err != nil {
return nil, nil, err
}
Expand Down

0 comments on commit d4dd72d

Please sign in to comment.