1
0
mirror of https://github.com/go-task/task.git synced 2024-12-04 10:24:45 +02:00

chore: allow using only github.com/go-task/task/v3/errors package (#1926)

This commit is contained in:
Oleksandr Redko 2024-11-30 17:00:58 +02:00 committed by GitHub
parent 41884f0a69
commit bc844246d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 17 additions and 4 deletions

View File

@ -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:

View File

@ -1,7 +1,6 @@
package main
import (
"errors"
"fmt"
"os"
"os/exec"
@ -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 (

View File

@ -2,7 +2,6 @@ package execext
import (
"context"
"errors"
"fmt"
"io"
"os"
@ -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

View File

@ -2,7 +2,6 @@ package flags
import (
"cmp"
"errors"
"log"
"os"
"strconv"
@ -10,6 +9,7 @@ import (
"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"
)

View File

@ -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"