wantsQuickFixes returns true if the Only filter is nil/empty (meaning all kinds are wanted) or explicitly includes the quickfix kind.
(only *[]lsproto.CodeActionKind)
| 245 | // wantsQuickFixes returns true if the Only filter is nil/empty (meaning all kinds are wanted) |
| 246 | // or explicitly includes the quickfix kind. |
| 247 | func wantsQuickFixes(only *[]lsproto.CodeActionKind) bool { |
| 248 | if only == nil || len(*only) == 0 { |
| 249 | return true |
| 250 | } |
| 251 | for _, kind := range *only { |
| 252 | if codeActionKindContains(kind, lsproto.CodeActionKindQuickFix) { |
| 253 | return true |
| 254 | } |
| 255 | } |
| 256 | return false |
| 257 | } |
| 258 | |
| 259 | // createFixAllAction creates a source.fixAll code action that applies all auto-fixable |
| 260 | // code fixes across the file. |
no test coverage detected