Skip to content

Commit

Permalink
Code linting
Browse files Browse the repository at this point in the history
  • Loading branch information
deining committed Dec 30, 2024
1 parent f65e80b commit 556ed9b
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 10 deletions.
2 changes: 0 additions & 2 deletions ginkgo/command/program.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ func (p Program) RunAndExit(osArgs []string) {
fmt.Fprintln(p.ErrWriter, deprecationTracker.DeprecationsReport())
}
p.Exiter(exitCode)
return
}()

args, additionalArgs := []string{}, []string{}
Expand Down Expand Up @@ -157,7 +156,6 @@ func (p Program) handleHelpRequestsAndExit(writer io.Writer, args []string) {
p.EmitUsage(writer)
Abort(AbortDetails{ExitCode: 1})
}
return
}

func (p Program) EmitUsage(writer io.Writer) {
Expand Down
2 changes: 1 addition & 1 deletion ginkgo/internal/gocovmerge.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func mergeProfileBlock(p *cover.Profile, pb cover.ProfileBlock, startIndex int)
}

i := 0
if sortFunc(i) != true {
if !sortFunc(i) {
i = sort.Search(len(p.Blocks)-startIndex, sortFunc)
}

Expand Down
2 changes: 1 addition & 1 deletion ginkgo/run/run_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ OUTER_LOOP:
}

if !endTime.IsZero() {
r.suiteConfig.Timeout = endTime.Sub(time.Now())
r.suiteConfig.Timeout = time.Until(endTime)
if r.suiteConfig.Timeout <= 0 {
suites[suiteIdx].State = internal.TestSuiteStateFailedDueToTimeout
opc.StopAndDrain()
Expand Down
2 changes: 1 addition & 1 deletion internal/internal_integration/progress_report_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ var _ = Describe("Progress Reporting", func() {
Describe("a container", func() {
It("A", func() {
cl = types.NewCodeLocation(0)
c := make(chan bool, 0)
c := make(chan bool)
go func() {
c <- true
<-c
Expand Down
5 changes: 1 addition & 4 deletions internal/parallel_support/http_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,7 @@ func (client *httpClient) PostAbort() error {

func (client *httpClient) ShouldAbort() bool {
err := client.poll("/abort", nil)
if err == ErrorGone {
return true
}
return false
return err == ErrorGone
}

func (client *httpClient) Write(p []byte) (int, error) {
Expand Down
2 changes: 1 addition & 1 deletion types/label_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ func tokenize(input string) func() (*treeNode, error) {
consumeUntil := func(cutset string) (string, int) {
j := i
for ; j < len(runes); j++ {
if strings.IndexRune(cutset, runes[j]) >= 0 {
if strings.ContainsRune(cutset, runes[j]) {
break
}
}
Expand Down

0 comments on commit 556ed9b

Please sign in to comment.