aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-linter
Commit message (Collapse)AuthorAgeFilesLines
* tools/syz-linter: suggest any instead of interface{}Dmitry Vyukov2025-12-222-0/+16
| | | | Any is the preferred over interface{} now in Go.
* all: use any instead of interface{}Dmitry Vyukov2025-12-221-2/+2
| | | | Any is the preferred over interface{} now in Go.
* tools/syz-linter: add loopvar testTaras Madan2025-02-171-0/+8
|
* tools/syz-linter: detect loop variables scopingTaras Madan2025-02-171-0/+24
| | | | | Loop variables are per-iteration, not per loop since go122. https://go.dev/blog/loopvar-preview
* tools/syz-linter: suggest use of min/max functionsDmitry Vyukov2025-01-172-0/+55
| | | | They are shorter, more readable, and don't require temp vars.
* tools/syz-linter: check tool.Failf messagesDmitry Vyukov2024-08-073-0/+15
| | | | Check tool.Failf messages for the common style as well.
* tools/syz-linter: check t.Logf/Errorf/Fatalf messagesDmitry Vyukov2024-04-172-2/+13
| | | | | Fix checking of Logf, it has string in 0-th arg. Add checking of t.Errorf/Fatalf.
* syz-fuzzer: use of monotonic time for latency measurementDmitry Vyukov2024-04-021-1/+1
| | | | | time.Now/Since may reject to use monotonic time if the fuzzer messes with system time badly enough. Enforce use of monotonic time.
* tools/syz-linter: check all Logf callsAleksandr Nogikh2024-03-121-1/+4
| | | | | | | We have a variety of T.Logf() methods, while in most cases there's no need to add signatures of each individual method to the syz-linter. Co-authored-by: Dmitry Vyukov <dvyukov@google.com>
* tools/syz-linter: fix golangci-lint plugin signaturePaul Chaignon2023-11-091-9/+3
| | | | | | | | | | This commit address the following warning: WARN plugin: 'AnalyzerPlugin' plugins are deprecated, please use the new plugin signature: https://golangci-lint.run/contributing/new-linters/#create-a-plugin Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
* syz-ci: do logging per job processorAleksandr Nogikh2023-01-191-1/+1
| | | | Now that we might have two, it might be helpful to split the logs.
* tools/syz-linter: improve duplicate parameter type detectionDmitry Vyukov2023-01-132-12/+26
| | | | | | | | Duplicate parameter type warning suggests to replace "a int, b int" with "a, b int" in function declarations. Currently it does not work for non-builtin types because we compare type pointers directly but they are different for non-builtin types. Compare type strings instead.
* tools/syz-linter: add go:embed to exceptionsAleksandr Nogikh2022-02-251-1/+1
| | | | | No space is allowed between // and go:embed. Make linter not throw a warning about it.
* pkg: update generated files to go 1.17Alexey Kardashevskiy2021-07-071-1/+1
| | | | | | | | | | | "make generate" produces this diff when go 1.17 (go1.17-c95464f0ea3f==upstream) is used. Seems compatible with >=1.16. https://github.com/golang/go/commit/4d2d89ff42ca documents the syntax. https://github.com/golang/go/commit/eeadce2d8713 enforces "ignore" for unsatisfiable tags hence the pkg/csource/gen.go change. Signed-off-by: Alexey Kardashevskiy <aik@linux.ibm.com>
* tools/syz-linter: warn about inconsistent flag definitionsDmitry Vyukov2020-11-302-12/+57
|
* tools/syz-linter: add a check for fmt.Printf/Fprintf messagesDmitry Vyukov2020-11-302-23/+53
|
* tools/syz-linter: check comments formatDmitry Vyukov2020-07-122-17/+52
| | | | | | | Check for capitalization, dots at the end and two spaces after a period. Update #1876
* tools/syz-linter: fix comments checkDmitry Vyukov2020-07-102-14/+19
| | | | | | | Turns out ast.Inspect does not visit most comments. Walk file.Comments manually. Update #1876
* tools/syz-linter: enable some standard lintersDmitry Vyukov2020-07-101-0/+11
| | | | | | Enable some x/tools linters that are not enabled in vet. Update #1876
* tools/syz-linter: introduce helper Pass typeDmitry Vyukov2020-07-061-54/+50
| | | | | | | Introduce a helper Pass type so that we can have some helper methods on it. Update #1876
* tools/syz-linter: check variable declarationsDmitry Vyukov2020-07-062-0/+29
| | | | | | | | | | | | | | Warn about: var x int = foo In most cases this can be expressed shorter as: var x int x := foo x := int(foo) Update #1876
* tools/syz-linter: check for \n at the end of log/error textDmitry Vyukov2020-07-062-13/+15
| | | | Update #1876
* tools/syz-linter: check log/error text ending with dotDmitry Vyukov2020-07-052-10/+26
| | | | Update #1876
* tools/syz-linter: check log/error text starting with capital letterDmitry Vyukov2020-07-052-2/+57
| | | | Update #1876
* tools/syz-linter: add check for dup types in func argsDmitry Vyukov2020-07-042-3/+71
| | | | | | | | Add check for: func foo(a int, b int) -> func foo(a, b int) Update #1876
* tools/syz-linter: add check for comment formatDmitry Vyukov2020-07-042-0/+28
| | | | Update #1876
* tools/syz-linter: add custom linterDmitry Vyukov2020-07-043-0/+132
For now we have 2 simple checks: 1. for multiline comments: /* */ -> // 2. for string len comparison with 0: len(str) != 0 -> str != "" Update #1876