- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,570 for reportf (0.14 sec)
-
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/buildtag/buildtag.go
check.pass.Reportf(pos, "malformed //go:build line (space between // and go:build)") } return } if !check.goBuildOK || check.inStar { check.pass.Reportf(pos, "misplaced //go:build comment") check.crossCheck = false return } if check.goBuildPos == token.NoPos { check.goBuildPos = pos } else { check.pass.Reportf(pos, "unexpected extra //go:build line")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 02:38:00 UTC 2024 - 9.3K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/directive/directive.go
check.pass.Reportf(pos, "//go:debug directive only valid in Go source files") } else if check.file.Name.Name != "main" && !strings.HasSuffix(check.filename, "_test.go") { check.pass.Reportf(pos, "//go:debug directive only valid in package main or test") } else if !check.inHeader { check.pass.Reportf(pos, "//go:debug directive only valid before package declaration") } } } // Go 1.20 strings.CutPrefix.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 5.4K bytes - Viewed (0) -
src/cmd/compile/internal/types2/predicates.go
for _, f := range t.fields { if !comparable(f.typ, dynamic, seen, nil) { if reportf != nil { reportf("struct containing %s cannot be compared", f.typ) } return false } } return true case *Array: if !comparable(t.elem, dynamic, seen, nil) { if reportf != nil { reportf("%s cannot be compared", t) } return false } return true case *Interface:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 17.5K bytes - Viewed (0) -
src/go/types/predicates.go
for _, f := range t.fields { if !comparable(f.typ, dynamic, seen, nil) { if reportf != nil { reportf("struct containing %s cannot be compared", f.typ) } return false } } return true case *Array: if !comparable(t.elem, dynamic, seen, nil) { if reportf != nil { reportf("%s cannot be compared", t) } return false } return true case *Interface:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 17.6K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/tests/tests.go
pass.Reportf(fn.Pos(), "%s should return nothing", fnName) } if tparams := fn.Type.TypeParams; tparams != nil && len(tparams.List) > 0 { pass.Reportf(fn.Pos(), "%s should not have type params", fnName) } if fnName == "Example" { // Nothing more to do. return } var ( exName = strings.TrimPrefix(fnName, "Example") elems = strings.SplitN(exName, "_", 3)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 02:38:00 UTC 2024 - 14.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/framepointer/framepointer.go
// Package framepointer defines an Analyzer that reports assembly code // that clobbers the frame pointer before saving it. package framepointer import ( "go/build" "regexp" "strings" "golang.org/x/tools/go/analysis" "golang.org/x/tools/go/analysis/passes/internal/analysisutil" ) const Doc = "report assembly that clobbers the frame pointer before saving it"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 02:38:00 UTC 2024 - 2.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unmarshal/unmarshal.go
switch t.Underlying().(type) { case *types.Pointer, *types.Interface, *types.TypeParam: return } switch argidx { case 0: pass.Reportf(call.Lparen, "call of %s passes non-pointer", fn.Name()) case 1: pass.Reportf(call.Lparen, "call of %s passes non-pointer as second argument", fn.Name()) } }) return nil, nil
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 3.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/buildtag/buildtag_old.go
} // Check each line of a //-comment. for _, c := range group.List { if !strings.Contains(c.Text, "+build") { continue } if err := checkLine(c.Text, pastCutoff); err != nil { pass.Reportf(c.Pos(), "%s", err) } } } } func checkOtherFile(pass *analysis.Pass, filename string) error { content, tf, err := analysisutil.ReadFile(pass, filename) if err != nil { return err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 02:38:00 UTC 2024 - 4.3K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unusedresult/unusedresult.go
if types.Identical(sig, sigNoArgsStringResult) { if stringMethods[fn.Name()] { pass.Reportf(call.Lparen, "result of (%s).%s call not used", sig.Recv().Type(), fn.Name()) } } } else { // package-level function (e.g. fmt.Errorf) if pkgFuncs[[2]string{fn.Pkg().Path(), fn.Name()}] { pass.Reportf(call.Lparen, "result of %s.%s call not used", fn.Pkg().Path(), fn.Name()) } } })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 22 19:00:13 UTC 2024 - 4.5K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/analysis.go
type ObjectFact struct { Object types.Object Fact Fact } // Reportf is a helper function that reports a Diagnostic using the // specified position and formatted error message. func (pass *Pass) Reportf(pos token.Pos, format string, args ...interface{}) { msg := fmt.Sprintf(format, args...) pass.Report(Diagnostic{Pos: pos, Message: msg}) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 9.1K bytes - Viewed (0)