mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
# What Add an ast-grep rule to use `bail!` rather than `Err(anyhow!(` in a return position. # Why This is slightly more compact, and allows us to port more code over to turbofmt/turbobail. Note: _this PR was previously merged into another branch due to a GH bug_
27 lines
629 B
YAML
27 lines
629 B
YAML
id: no-err-anyhow
|
|
snapshots:
|
|
Err(anyhow!("error message")):
|
|
labels:
|
|
- source: Err(anyhow!("error message"))
|
|
style: primary
|
|
start: 0
|
|
end: 29
|
|
'Err(anyhow!("error: {}", msg))':
|
|
labels:
|
|
- source: 'Err(anyhow!("error: {}", msg))'
|
|
style: primary
|
|
start: 0
|
|
end: 30
|
|
Err(anyhow::anyhow!("error message")):
|
|
labels:
|
|
- source: Err(anyhow::anyhow!("error message"))
|
|
style: primary
|
|
start: 0
|
|
end: 37
|
|
'Err(anyhow::anyhow!("error: {}", msg))':
|
|
labels:
|
|
- source: 'Err(anyhow::anyhow!("error: {}", msg))'
|
|
style: primary
|
|
start: 0
|
|
end: 38
|