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: add linter mirror #2060

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
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ linters:
- goimports
- gofmt
- gofumpt
- mirror
- misspell
- noctx
- paralleltest
Expand Down
2 changes: 1 addition & 1 deletion errors/error_taskfile_decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (err *TaskfileDecodeError) WithTypeMessage(t string) *TaskfileDecodeError {
func (err *TaskfileDecodeError) WithFileInfo(location string, b []byte, padding int) *TaskfileDecodeError {
buf := &bytes.Buffer{}
if err := quick.Highlight(buf, string(b), "yaml", "terminal", "task"); err != nil {
buf.WriteString(string(b))
buf.Write(b)
}
lines := strings.Split(buf.String(), "\n")
start := max(err.Line-1-padding, 0)
Expand Down
6 changes: 3 additions & 3 deletions task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ func TestPromptInSummary(t *testing.T) {
var outBuff bytes.Buffer
var errBuff bytes.Buffer

inBuff.Write([]byte(test.input))
inBuff.WriteString(test.input)

e := task.Executor{
Dir: dir,
Expand Down Expand Up @@ -795,7 +795,7 @@ func TestPromptWithIndirectTask(t *testing.T) {
var outBuff bytes.Buffer
var errBuff bytes.Buffer

inBuff.Write([]byte("y\n"))
inBuff.WriteString("y\n")

e := task.Executor{
Dir: dir,
Expand Down Expand Up @@ -832,7 +832,7 @@ func TestPromptAssumeYes(t *testing.T) {
var errBuff bytes.Buffer

// always cancel the prompt so we can require.Error
inBuff.Write([]byte("\n"))
inBuff.WriteByte('\n')

e := task.Executor{
Dir: dir,
Expand Down
Loading