- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 3,240 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/cgocall/cgocall.go
if err != nil { return nil, err } for _, f := range cgofiles { checkCgo(pass.Fset, f, info, pass.Reportf) } return nil, nil } func checkCgo(fset *token.FileSet, f *ast.File, info *types.Info, reportf func(token.Pos, string, ...interface{})) { ast.Inspect(f, func(n ast.Node) bool { call, ok := n.(*ast.CallExpr) if !ok { return true }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 11.2K 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/defers/defers.go
} checkDeferCall := func(node ast.Node) bool { switch v := node.(type) { case *ast.CallExpr: if analysisutil.IsFunctionNamed(typeutil.StaticCallee(pass.TypesInfo, v), "time", "Since") { pass.Reportf(v.Pos(), "call to time.Since is not deferred") } case *ast.FuncLit: return false // prune } return true } inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 1.4K bytes - Viewed (0)