Skip to content

Commit

Permalink
all: update gogrep links, we're using a different gogrep now (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
quasilyte authored Dec 22, 2021
1 parent 311fc13 commit c321c54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,6 @@ Note: `go-critic` embeds the rules using the IR precompilation feature.
## Extra references

* Online ruleguard playground: [go-ruleguard.github.io/play](https://go-ruleguard.github.io/play)
* [gogrep](https://github.com/mvdan/gogrep) - underlying AST matching engine
* [gogrep](https://github.com/quasilyte/gogrep) - underlying AST matching engine
* [NoVerify: Dynamic Rules for Static Analysis](https://medium.com/@vktech/noverify-dynamic-rules-for-static-analysis-8f42859e9253)
* [Ruleguard comparison with Semgrep and CodeQL](https://speakerdeck.com/quasilyte/ruleguard-vs-semgrep-vs-codeql)
2 changes: 1 addition & 1 deletion _docs/dsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Every **matcher function** accepts exactly 1 argument, a [`dsl.Matcher`](https:/

Every **rule** definition starts with a [`Match()`](https://godoc.org/github.com/quasilyte/go-ruleguard/dsl#Matcher.Match) or [`MatchComment()`](https://godoc.org/github.com/quasilyte/go-ruleguard/dsl#Matcher.MatchComment) method call.

* For `Match()`, you specify one or more [AST patterns](https://github.com/mvdan/gogrep) that should represent what kind of Go code a rule is supposed to match.
* For `Match()`, you specify one or more [AST patterns](https://github.com/quasilyte/gogrep) that should represent what kind of Go code a rule is supposed to match.
* For `MatchComment()`, you provide one or more regular expressions that should match a comment of interest.

Another mandatory part is [`Report()`](https://godoc.org/github.com/quasilyte/go-ruleguard/dsl#Matcher.Report) or [`Suggest()`](https://godoc.org/github.com/quasilyte/go-ruleguard/dsl#Matcher.Suggest) that describe a rule match action. `Report()` will print a warning message while `Suggest()` can be used to provide a quickfix action (a syntax rewrite pattern).
Expand Down

0 comments on commit c321c54

Please sign in to comment.