getCodeFixActions gets per-diagnostic quick fix code actions, excluding fix-all entries.
(t *testing.T, errorCode ...int)
| 1917 | |
| 1918 | // getCodeFixActions gets per-diagnostic quick fix code actions, excluding fix-all entries. |
| 1919 | func (f *FourslashTest) getCodeFixActions(t *testing.T, errorCode ...int) []*lsproto.CodeAction { |
| 1920 | t.Helper() |
| 1921 | all := f.getAllQuickFixActions(t, errorCode...) |
| 1922 | // Filter to only per-diagnostic fixes (those with diagnostics attached) |
| 1923 | var actions []*lsproto.CodeAction |
| 1924 | for _, action := range all { |
| 1925 | if action.Diagnostics != nil && len(*action.Diagnostics) > 0 { |
| 1926 | actions = append(actions, action) |
| 1927 | } |
| 1928 | } |
| 1929 | return actions |
| 1930 | } |
| 1931 | |
| 1932 | // getAllQuickFixActions gets all quick fix code actions including fix-all entries. |
| 1933 | func (f *FourslashTest) getAllQuickFixActions(t *testing.T, errorCode ...int) []*lsproto.CodeAction { |
no test coverage detected