Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading