Skip to content

Commit

Permalink
chore: allow using only github.com/go-task/task/v3/errors package (#1926
Browse files Browse the repository at this point in the history
)
  • Loading branch information
alexandear authored Nov 30, 2024
1 parent 41884f0 commit bc84424
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
11 changes: 11 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,23 @@

linters:
enable:
- depguard
- goimports
- gofmt
- gofumpt
- misspell

linters-settings:
depguard:
rules:
main:
files:
- "$all"
- "!$test"
- "!**/errors/*.go"
deny:
- pkg: "errors"
desc: "Use github.com/go-task/task/v3/errors instead"
goimports:
local-prefixes: github.com/go-task
gofmt:
Expand Down
3 changes: 2 additions & 1 deletion cmd/release/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"errors"
"fmt"
"os"
"os/exec"
Expand All @@ -12,6 +11,8 @@ import (
"github.com/Masterminds/semver/v3"
"github.com/otiai10/copy"
"github.com/spf13/pflag"

"github.com/go-task/task/v3/errors"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion internal/execext/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package execext

import (
"context"
"errors"
"fmt"
"io"
"os"
Expand All @@ -14,6 +13,8 @@ import (
"mvdan.cc/sh/v3/interp"
"mvdan.cc/sh/v3/shell"
"mvdan.cc/sh/v3/syntax"

"github.com/go-task/task/v3/errors"
)

// RunCommandOptions is the options for the RunCommand func
Expand Down
2 changes: 1 addition & 1 deletion internal/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package flags

import (
"cmp"
"errors"
"log"
"os"
"strconv"
"time"

"github.com/spf13/pflag"

"github.com/go-task/task/v3/errors"
"github.com/go-task/task/v3/internal/experiments"
"github.com/go-task/task/v3/taskfile/ast"
)
Expand Down
2 changes: 1 addition & 1 deletion precondition.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package task

import (
"context"
"errors"

"github.com/go-task/task/v3/errors"
"github.com/go-task/task/v3/internal/env"
"github.com/go-task/task/v3/internal/execext"
"github.com/go-task/task/v3/internal/logger"
Expand Down

0 comments on commit bc84424

Please sign in to comment.