Skip to content

Commit 01ca636

Browse files
committed
refactor(gotools): 📝 add verbose handling for golangci-lint tooling
1 parent 82964d5 commit 01ca636

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

gotools/gotools.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ func (Golang) Init() error {
3636

3737
// 🔎 Lint runs golangci-lint tooling.
3838
func (Golang) Lint() error {
39+
var vflag string
40+
if mg.Verbose() {
41+
vflag = "-v"
42+
}
3943
pterm.Info.Println("Running golangci-lint")
40-
if err := tooling.RunTool("golangci-lint", "run", "./..."); err != nil {
44+
if err := tooling.RunTool("golangci-lint", "run", "./...", vflag); err != nil {
4145
return err
4246
}
4347

@@ -55,7 +59,7 @@ func (Golang) Fmt() error {
5559
}()
5660

5761
p.Title = "gofmt"
58-
if err := sh.Run("gofmt", "-s", "-w", "."); err != nil {
62+
if err := tooling.RunTool("gofmt", "-s", "-w", "."); err != nil {
5963
return err
6064
}
6165
p.Increment()

0 commit comments

Comments
 (0)