aboutsummaryrefslogtreecommitdiff
path: root/docs/dev
diff options
context:
space:
mode:
Diffstat (limited to 'docs/dev')
-rw-r--r--docs/dev/README.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/dev/README.md b/docs/dev/README.md
index 1b63d8223..11dc5261b 100644
--- a/docs/dev/README.md
+++ b/docs/dev/README.md
@@ -166,6 +166,17 @@ That said, adding an innocent-looking `pub use` is a very simple way to break en
166Note: if you enjoyed this abstract hand-waving about boundaries, you might appreciate 166Note: if you enjoyed this abstract hand-waving about boundaries, you might appreciate
167https://www.tedinski.com/2018/02/06/system-boundaries.html 167https://www.tedinski.com/2018/02/06/system-boundaries.html
168 168
169## Minimal Tests
170
171Most tests in rust-analyzer start with a snippet of Rust code.
172This snippets should be minimal -- if you copy-paste a snippet of real code into the tests, make sure to remove everything which could be removed.
173There are many benefits to this:
174
175* less to read or to scroll past
176* easier to understand what exactly is tested
177* less stuff printed during printf-debugging
178* less time to run test
179
169## Order of Imports 180## Order of Imports
170 181
171We separate import groups with blank lines 182We separate import groups with blank lines
@@ -348,6 +359,8 @@ To update test data, run with `UPDATE_EXPECTATIONS` variable:
348env UPDATE_EXPECTATIONS=1 cargo qt 359env UPDATE_EXPECTATIONS=1 cargo qt
349``` 360```
350 361
362After adding a new inline test you need to run `cargo xtest codegen` and also update the test data as described above.
363
351# Logging 364# Logging
352 365
353Logging is done by both rust-analyzer and VS Code, so it might be tricky to 366Logging is done by both rust-analyzer and VS Code, so it might be tricky to