diff options
Diffstat (limited to 'docs/dev')
-rw-r--r-- | docs/dev/architecture.md | 2 | ||||
-rw-r--r-- | docs/dev/style.md | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/docs/dev/architecture.md b/docs/dev/architecture.md index 3de1b99a5..721c555ab 100644 --- a/docs/dev/architecture.md +++ b/docs/dev/architecture.md | |||
@@ -428,7 +428,7 @@ Rather than spawning futures or scheduling callbacks (open), the event loop acce | |||
428 | It's easy to see all the things that trigger rust-analyzer processing, together with their performance | 428 | It's easy to see all the things that trigger rust-analyzer processing, together with their performance |
429 | 429 | ||
430 | rust-analyzer includes a simple hierarchical profiler (`hprof`). | 430 | rust-analyzer includes a simple hierarchical profiler (`hprof`). |
431 | It is enabled with `RA_PROFILE='*>50` env var (log all (`*`) actions which take more than `50` ms) and produces output like: | 431 | It is enabled with `RA_PROFILE='*>50'` env var (log all (`*`) actions which take more than `50` ms) and produces output like: |
432 | 432 | ||
433 | ``` | 433 | ``` |
434 | 85ms - handle_completion | 434 | 85ms - handle_completion |
diff --git a/docs/dev/style.md b/docs/dev/style.md index 96dd684b3..84485ea28 100644 --- a/docs/dev/style.md +++ b/docs/dev/style.md | |||
@@ -174,6 +174,13 @@ Instead, explicitly check for `None`, `Err`, etc. | |||
174 | `rust-analyzer` is not a library, we don't need to test for API misuse, and we have to handle any user input without panics. | 174 | `rust-analyzer` is not a library, we don't need to test for API misuse, and we have to handle any user input without panics. |
175 | Panic messages in the logs from the `#[should_panic]` tests are confusing. | 175 | Panic messages in the logs from the `#[should_panic]` tests are confusing. |
176 | 176 | ||
177 | ## `#[ignore]` | ||
178 | |||
179 | Do not `#[ignore]` tests. | ||
180 | If the test currently does not work, assert the wrong behavior and add a fixme explaining why it is wrong. | ||
181 | |||
182 | **Rationale:** noticing when the behavior is fixed, making sure that even the wrong behavior is acceptable (ie, not a panic). | ||
183 | |||
177 | ## Function Preconditions | 184 | ## Function Preconditions |
178 | 185 | ||
179 | Express function preconditions in types and force the caller to provide them (rather than checking in callee): | 186 | Express function preconditions in types and force the caller to provide them (rather than checking in callee): |