mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-05 15:32:49 +00:00
parent
4bd6dbe83c
commit
42bf17936f
@ -115,7 +115,6 @@ directory](https://github.com/jj-vcs/jj/tree/main/cli/src/commands). Working
|
||||
on them requires setting up a Rust development environment, as described
|
||||
below, and may occasionally require adjusting a test.
|
||||
|
||||
|
||||
## Learning Rust
|
||||
|
||||
In addition to the [Rust Book](https://doc.rust-lang.org/book/) and the other
|
||||
@ -123,6 +122,10 @@ excellent resources at <https://www.rust-lang.org/learn>, we recommend the
|
||||
["Comprehensive Rust" mini-course](https://google.github.io/comprehensive-rust/)
|
||||
for an overview, especially if you are familiar with C++.
|
||||
|
||||
## Style guide
|
||||
|
||||
See [here](style_guide.md).
|
||||
|
||||
## Setting up a development environment
|
||||
|
||||
To develop `jj`, the mandatory steps are simply
|
||||
|
12
docs/style_guide.md
Normal file
12
docs/style_guide.md
Normal file
@ -0,0 +1,12 @@
|
||||
# Style guide
|
||||
|
||||
## Panics
|
||||
|
||||
Panics are not allowed, especially in code that may run on a server. Calling
|
||||
`.unwrap()` is okay if it's guaranteed to be safe by previous checks or
|
||||
documented invariants. For example, if a function is documented as requiring
|
||||
a non-empty slice as input, it's fine to call `slice[0]` and panic.
|
||||
|
||||
## Markdown
|
||||
|
||||
Try to wrap at 80 columns. We don't have a formatter yet.
|
Loading…
x
Reference in New Issue
Block a user