Skip to content

feat: fail CI when pubsub.Publish calls are found in db transactions #17903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 19, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: add short var declaration
Signed-off-by: Danny Kopping <dannykopping@gmail.com>
  • Loading branch information
dannykopping committed May 19, 2025
commit 50d26fecee07d965a79b743c9a16c1a47c0ffa56
8 changes: 8 additions & 0 deletions scripts/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ func publishInTransaction(m dsl.Matcher) {
$_ = $ps.Publish($evt, $msg)
$*_
}, $*_)
`,
// Alternative with short variable declaration
`
$x.InTx(func($y) error {
$*_
$_ := $ps.Publish($evt, $msg)
$*_
}, $*_)
`,
// Without catching error return
`
Expand Down
Loading