Skip to content

Commit 80c319a

Browse files
committed
Fixing tests with latest linting rules
1 parent b25ae78 commit 80c319a

File tree

5 files changed

+6
-0
lines changed

5 files changed

+6
-0
lines changed

cmd/evaluate_all_command_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ func TestCreateEvaluateAllCommand(t *testing.T) {
1313

1414
if cmd == nil {
1515
t.Fatal("createEvaluateAllCommand returned nil")
16+
return
1617
}
1718

1819
// Test basic command properties

cmd/evaluate_sequence_command_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ func TestCreateEvaluateSequenceCommand(t *testing.T) {
1313

1414
if cmd == nil {
1515
t.Fatal("createEvaluateSequenceCommand returned nil")
16+
return
1617
}
1718

1819
// Test basic command properties

cmd/root_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ func TestNew(t *testing.T) {
195195

196196
if rootCmd == nil {
197197
t.Fatal("New() returned nil")
198+
return
198199
}
199200

200201
// Test basic command properties

pkg/yqlib/expression_parser_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ func TestParserSingleOperation(t *testing.T) {
9595
test.AssertResultComplex(t, nil, err)
9696
if result == nil {
9797
t.Fatal("Expected non-nil result for single operation")
98+
return
9899
}
99100
if result.Operation == nil {
100101
t.Fatal("Expected operation to be set")

yq_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ func TestMainFunction(t *testing.T) {
1414
cmd := command.New()
1515
if cmd == nil {
1616
t.Fatal("command.New() returned nil")
17+
return
1718
}
1819

1920
if cmd.Use != "yq" {
@@ -99,6 +100,7 @@ func TestMainFunctionExecution(t *testing.T) {
99100
// the command structure is correct and can be configured
100101
if cmd == nil {
101102
t.Fatal("Command should not be nil")
103+
return
102104
}
103105

104106
if cmd.Use != "yq" {

0 commit comments

Comments
 (0)