Skip to content

Commit

Permalink
Moved back to NewAnalyzer().
Browse files Browse the repository at this point in the history
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
  • Loading branch information
bwplotka committed Mar 7, 2020
1 parent 5dbd63e commit 95f68dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions faillint/faillint.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ type faillint struct {

// Analyzer is a global instance of the linter.
// DEPRECATED: Use faillint.New instead.
var Analyzer = New()
var Analyzer = NewAnalyzer()

// New create a faillint analyzer.
func New() *analysis.Analyzer {
// NewAnalyzer create a faillint analyzer.
func NewAnalyzer() *analysis.Analyzer {
f := faillint{
paths: "",
ignoretests: false,
Expand Down
2 changes: 1 addition & 1 deletion faillint/faillint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func TestRun(t *testing.T) {
},
} {
t.Run(tcase.name, func(t *testing.T) {
f := New()
f := NewAnalyzer()
f.Flags.Set("paths", tcase.paths)
if tcase.ignoreTestFiles {
f.Flags.Set("ignore-tests", "true")
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import (
)

func main() {
singlechecker.Main(faillint.New())
singlechecker.Main(faillint.NewAnalyzer())
}

0 comments on commit 95f68dc

Please sign in to comment.