mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-05 23:42:50 +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
|
on them requires setting up a Rust development environment, as described
|
||||||
below, and may occasionally require adjusting a test.
|
below, and may occasionally require adjusting a test.
|
||||||
|
|
||||||
|
|
||||||
## Learning Rust
|
## Learning Rust
|
||||||
|
|
||||||
In addition to the [Rust Book](https://doc.rust-lang.org/book/) and the other
|
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/)
|
["Comprehensive Rust" mini-course](https://google.github.io/comprehensive-rust/)
|
||||||
for an overview, especially if you are familiar with C++.
|
for an overview, especially if you are familiar with C++.
|
||||||
|
|
||||||
|
## Style guide
|
||||||
|
|
||||||
|
See [here](style_guide.md).
|
||||||
|
|
||||||
## Setting up a development environment
|
## Setting up a development environment
|
||||||
|
|
||||||
To develop `jj`, the mandatory steps are simply
|
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