Skip to content

Commit

Permalink
readme: fix typos (#426)
Browse files Browse the repository at this point in the history
Fix a couple of minor typos.
  • Loading branch information
cristiangreco authored Dec 22, 2022
1 parent ce1bf37 commit cb003bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func exposedMutex(m dsl.Matcher) {

m.Match(`type $name struct { $*_; sync.RWMutex; $*_ }`).
Where(isExported(m["name"])).
Report("don not embed sync.RWMutex")
Report("do not embed sync.RWMutex")
}
```

Expand Down Expand Up @@ -162,7 +162,7 @@ The `rules.go` file is written in terms of [`dsl`](https://pkg.go.dev/github.com

A rule definition always starts with [`Match(patterns...)`](https://pkg.go.dev/github.com/quasilyte/go-ruleguard/dsl#Matcher.Match) method call and ends with [`Report(message)`](https://pkg.go.dev/github.com/quasilyte/go-ruleguard/dsl#Matcher.Report) method call.

There can be additional calls in between these two. For example, a [`Where(cond)`](https://pkg.go.dev/github.com/quasilyte/go-ruleguard/dsl#Matcher.Where) call applies constraints to a match to decide whether its accepted or rejected. So even if there is a match for a pattern, it won't produce a report message unless it satisfies a `Where()` condition.
There can be additional calls in between these two. For example, a [`Where(cond)`](https://pkg.go.dev/github.com/quasilyte/go-ruleguard/dsl#Matcher.Where) call applies constraints to a match to decide whether it's accepted or rejected. So even if there is a match for a pattern, it won't produce a report message unless it satisfies a `Where()` condition.

## Troubleshooting

Expand Down

0 comments on commit cb003bc

Please sign in to comment.