Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for TextEdits (0.33 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/analysis/diagnostic.go

    // meant to fix the issue flagged by the diagnostic.
    //
    // The TextEdits must not overlap, nor contain edits for other packages.
    type SuggestedFix struct {
    	// A description for this suggested fix to be shown to a user deciding
    	// whether to accept it.
    	Message   string
    	TextEdits []TextEdit
    }
    
    // A TextEdit represents the replacement of the code between Pos and End with the new text.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/assign/assign.go

    			if le == re {
    				pass.Report(analysis.Diagnostic{
    					Pos: stmt.Pos(), Message: fmt.Sprintf("self-assignment of %s to %s", re, le),
    					SuggestedFixes: []analysis.SuggestedFix{
    						{Message: "Remove", TextEdits: []analysis.TextEdit{
    							{Pos: stmt.Pos(), End: stmt.End(), NewText: []byte{}},
    						}},
    					},
    				})
    			}
    		}
    	})
    
    	return nil, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/sigchanyzer/sigchanyzer.go

    			Pos:     call.Pos(),
    			End:     call.End(),
    			Message: "misuse of unbuffered os.Signal channel as argument to signal.Notify",
    			SuggestedFixes: []analysis.SuggestedFix{{
    				Message: "Change to buffer channel",
    				TextEdits: []analysis.TextEdit{{
    					Pos:     chanDecl.Pos(),
    					End:     chanDecl.End(),
    					NewText: buf.Bytes(),
    				}},
    			}},
    		})
    	})
    	return nil, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 09 01:28:01 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/timeformat/timeformat.go

    						End:     token.Pos(end),
    						Message: badFormat + " should be " + goodFormat,
    						SuggestedFixes: []analysis.SuggestedFix{{
    							Message: "Replace " + badFormat + " with " + goodFormat,
    							TextEdits: []analysis.TextEdit{{
    								Pos:     token.Pos(pos),
    								End:     token.Pos(end),
    								NewText: []byte(goodFormat),
    							}},
    						}},
    					})
    				} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/composite/composite.go

    			}
    			if suggestedFixAvailable {
    				diag.SuggestedFixes = []analysis.SuggestedFix{{
    					Message:   "Add field names to struct literal",
    					TextEdits: missingKeys,
    				}}
    			}
    			pass.Report(diag)
    			return
    		}
    	})
    	return nil, nil
    }
    
    // isLocalType reports whether typ belongs to the same package as pass.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/go/analysis/internal/analysisflags/flags.go

    	Start    int    `json:"start"`
    	End      int    `json:"end"`
    	New      string `json:"new"`
    }
    
    // A JSONSuggestedFix describes an edit that should be applied as a whole or not
    // at all. It might contain multiple TextEdits/text_edits if the SuggestedFix
    // consists of multiple non-contiguous edits.
    type JSONSuggestedFix struct {
    	Message string         `json:"message"`
    	Edits   []JSONTextEdit `json:"edits"`
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 19:00:13 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/stringintconv/string.go

    		}
    
    		if convertibleToRune {
    			diag.SuggestedFixes = []analysis.SuggestedFix{
    				{
    					Message: "Did you mean to convert a rune to a string?",
    					TextEdits: []analysis.TextEdit{
    						{
    							Pos:     arg.Pos(),
    							End:     arg.Pos(),
    							NewText: []byte("rune("),
    						},
    						{
    							Pos:     arg.End(),
    							End:     arg.End(),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unreachable/unreachable.go

    		default:
    			d.pass.Report(analysis.Diagnostic{
    				Pos:     stmt.Pos(),
    				End:     stmt.End(),
    				Message: "unreachable code",
    				SuggestedFixes: []analysis.SuggestedFix{{
    					Message: "Remove",
    					TextEdits: []analysis.TextEdit{{
    						Pos: stmt.Pos(),
    						End: stmt.End(),
    					}},
    				}},
    			})
    			d.reachable = true // silence error about next statement
    		}
    	}
    
    	switch x := stmt.(type) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 09 01:28:01 UTC 2023
    - 7.6K bytes
    - Viewed (0)
Back to top