Skip to content

Commit 367aa36

Browse files
Add repo-specific guidance for co-pilot (#766)
* Add repo-specific guidance for co-pilot * Update .github/copilot-instructions.md Co-authored-by: Davis Vaughan <[email protected]> --------- Co-authored-by: Davis Vaughan <[email protected]>
1 parent 8c1d097 commit 367aa36

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/copilot-instructions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Do not use `bail!`. Instead use an explicit `return Err(anyhow!(...))`.
2+
3+
When a `match` expression is the last expression in a function, omit `return` keywords in match arms. Let the expression evaluate to the function's return value.
4+
5+
For error messages and logging, prefer direct formatting syntax: `Err(anyhow!("Message: {err}"))` instead of `Err(anyhow!("Message: {}", err))`.
6+
7+
Use `log::trace!` instead of `log::debug!`.
8+
9+
Use fully qualified result types (`anyhow::Result`) instead of importing them.

0 commit comments

Comments
 (0)