Skip to content

init: use ast-grep

init: use ast-grep #4

GitHub Actions / ast-grep completed Aug 22, 2024 in 1s

reviewdog [ast-grep] report

reported by reviewdog 🐶

Findings (3)

testdata/main.go|14 col 1| Avoid to use deprecated function
testdata/main.go|16 col 2| Do not leave fixme comment
testdata/main.go|9 col 6| Do not use context.TODO in production code (Note: context.TODO() is just a temporary thing)

Filtered Findings (0)

Annotations

Check warning on line 14 in testdata/main.go

See this annotation in the file changed.

@github-actions github-actions / ast-grep

[ast-grep] testdata/main.go#L14 <avoid-use-deprecated-function>(https://github.com/ast-grep/ast-grep)

Avoid to use deprecated function
Raw output
{"text":"// Deprecated: deprecated function","range":{"byteOffset":{"start":110,"end":144},"start":{"line":13,"column":0},"end":{"line":13,"column":34}},"file":"testdata/main.go","lines":"// Deprecated: deprecated function","charCount":{"leading":0,"trailing":0},"language":"Go","ruleId":"avoid-use-deprecated-function","severity":"warning","note":null,"message":"Avoid to use deprecated function"}

Check notice on line 16 in testdata/main.go

See this annotation in the file changed.

@github-actions github-actions / ast-grep

[ast-grep] testdata/main.go#L16 <no-fixme-comment>(https://github.com/ast-grep/ast-grep)

Do not leave fixme comment
Raw output
{"text":"// FIXME: implement me","range":{"byteOffset":{"start":159,"end":181},"start":{"line":15,"column":1},"end":{"line":15,"column":23}},"file":"testdata/main.go","lines":"\t// FIXME: implement me","charCount":{"leading":1,"trailing":0},"language":"Go","ruleId":"no-fixme-comment","severity":"info","note":null,"message":"Do not leave fixme comment"}

Check failure on line 9 in testdata/main.go

See this annotation in the file changed.

@github-actions github-actions / ast-grep

[ast-grep] testdata/main.go#L9 <no-context-todo>(https://github.com/ast-grep/ast-grep)

Do not use context.TODO in production code (Note: context.TODO() is just a temporary thing)
Raw output
{"text":"context.TODO()","range":{"byteOffset":{"start":63,"end":77},"start":{"line":8,"column":5},"end":{"line":8,"column":19}},"file":"testdata/main.go","lines":"\t_ = context.TODO()","charCount":{"leading":5,"trailing":0},"replacement":"context.Background()","replacementOffsets":{"start":63,"end":77},"language":"Go","ruleId":"no-context-todo","severity":"error","note":"context.TODO() is just a temporary thing","message":"Do not use context.TODO in production code"}