Skip to content

Commit b4eac5e

Browse files
committed
Fix linters, makefile, fmt
Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com>
1 parent 1fe9621 commit b4eac5e

File tree

7 files changed

+16
-8
lines changed

7 files changed

+16
-8
lines changed

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ goimports:
1111
@goimports -w .
1212

1313
lint:
14-
@echo "🚀 Running lint..."
15-
@command -v golangci-lint > /dev/null || (echo "🚀 Installing golangci-lint..."; curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${GOPATH}/bin")
14+
@echo "🚀 Installing/updating golangci-lint…"
15+
GO111MODULE=on go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
16+
17+
@echo "🚀 Running lint…"
1618
@make addheaders
1719
@make goimports
1820
@make fmt
19-
@./hack/go-lint.sh ${params}
21+
@$(GOPATH)/bin/golangci-lint run ./... ${params}
2022
@echo "✅ Linting completed!"
2123

2224
.PHONY: test

impl/ctx/context.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ import (
1919
"encoding/json"
2020
"errors"
2121
"fmt"
22-
"github.com/serverlessworkflow/sdk-go/v3/impl/utils"
2322
"sync"
2423
"time"
2524

25+
"github.com/serverlessworkflow/sdk-go/v3/impl/utils"
26+
2627
"github.com/google/uuid"
2728
"github.com/serverlessworkflow/sdk-go/v3/model"
2829
)
@@ -134,7 +135,7 @@ func (ctx *workflowContext) Clone() WorkflowContext {
134135
newLocalExprVars := utils.DeepClone(ctx.localExprVars)
135136

136137
newStatusPhase := append([]StatusPhaseLog(nil), ctx.StatusPhase...)
137-
138+
138139
newTasksStatusPhase := make(map[string][]StatusPhaseLog, len(ctx.TasksStatusPhase))
139140
for taskName, logs := range ctx.TasksStatusPhase {
140141
newTasksStatusPhase[taskName] = append([]StatusPhaseLog(nil), logs...)

impl/runner.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ package impl
1717
import (
1818
"context"
1919
"fmt"
20+
"time"
21+
2022
"github.com/serverlessworkflow/sdk-go/v3/impl/expr"
2123
"github.com/serverlessworkflow/sdk-go/v3/impl/utils"
22-
"time"
2324

2425
"github.com/serverlessworkflow/sdk-go/v3/impl/ctx"
2526
"github.com/serverlessworkflow/sdk-go/v3/model"

impl/task_runner_do.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ package impl
1616

1717
import (
1818
"fmt"
19+
"time"
20+
1921
"github.com/serverlessworkflow/sdk-go/v3/impl/expr"
2022
"github.com/serverlessworkflow/sdk-go/v3/impl/utils"
21-
"time"
2223

2324
"github.com/serverlessworkflow/sdk-go/v3/impl/ctx"
2425
"github.com/serverlessworkflow/sdk-go/v3/model"

impl/task_runner_fork.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ package impl
1717
import (
1818
"context"
1919
"fmt"
20-
"github.com/serverlessworkflow/sdk-go/v3/model"
2120
"sync"
21+
22+
"github.com/serverlessworkflow/sdk-go/v3/model"
2223
)
2324

2425
func NewForkTaskRunner(taskName string, task *model.ForkTask, workflowDef *model.Workflow) (*ForkTaskRunner, error) {

impl/task_runner_raise.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ package impl
1616

1717
import (
1818
"fmt"
19+
1920
"github.com/serverlessworkflow/sdk-go/v3/impl/expr"
2021
"github.com/serverlessworkflow/sdk-go/v3/model"
2122
)

impl/task_runner_set.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ package impl
1616

1717
import (
1818
"fmt"
19+
1920
"github.com/serverlessworkflow/sdk-go/v3/impl/expr"
2021
"github.com/serverlessworkflow/sdk-go/v3/impl/utils"
2122

0 commit comments

Comments
 (0)