Skip to content

Commit

Permalink
fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
tsingbx committed Oct 29, 2024
1 parent 7d8c7a4 commit 4e18907
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/go/printer/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ func (p *printer) writeCommentPrefix(pos, next token.Position, prev *ast.Comment
return
}

if pos.Line == p.last.Line && (prev == nil || (len(prev.Text) > 1 && prev.Text[1] != '/')) {
if pos.Line == p.last.Line && (prev == nil || len(prev.Text) > 1 && prev.Text[1] != '/') {

Check warning on line 362 in internal/go/printer/printer.go

View check run for this annotation

qiniu-x / golangci-lint

internal/go/printer/printer.go#L362

`if pos.Line == p.last.Line && (prev == nil || len(prev.Text) > 1 && prev.Text[1] != '/')` has complex nested blocks (complexity: 13) (nestif)
// comment on the same line as last item:
// separate with at least one separator
hasSep := false
Expand Down

0 comments on commit 4e18907

Please sign in to comment.