Running golangci-lint run for various different files

1,051 views
Skip to first unread message

Beginner

unread,
Jan 26, 2022, 12:08:28 PM1/26/22
to golang-nuts
Hey when i run golangci-lint run app/main.go utils/db/db.go i get an error stating `named files must all be in one directory golang` why is that ?

Tamás Gulácsi

unread,
Jan 27, 2022, 10:43:34 AM1/27/22
to golang-nuts
Just as with other tools, golangci-lint run runs on packages, not individual files:

    golangci-lint run ./app ./utils/db
Reply all
Reply to author
Forward
0 new messages