|
58 | 58 | behaviour being corrected both to validate the fix and to guard against |
59 | 59 | regression. |
60 | 60 | - Passes all relevant unit and behavioral tests according to the guidelines |
61 | | - above. |
62 | | - - Passes lint checks |
63 | | - - Adheres to formatting standards tested using a formatting validator. |
| 61 | + above. (Use `make test` to verify). |
| 62 | + - Passes lint checks. (Use `make lint` to verify). |
| 63 | + - Adheres to formatting standards tested using a formatting validator. (Use |
| 64 | + `make check-fmt` to verify). |
64 | 65 | - **Committing:** |
65 | 66 | - Only changes that meet all the quality gates above should be committed. |
66 | 67 | - Write clear, descriptive commit messages summarizing the change, following |
@@ -147,6 +148,19 @@ project: |
147 | 148 | - Prefer `.expect()` over `.unwrap()`. |
148 | 149 | - Use `concat!()` to combine long string literals rather than escaping newlines |
149 | 150 | with a backslash. |
| 151 | +- Prefer single line versions of functions where appropriate. I.e., |
| 152 | + |
| 153 | + ``` |
| 154 | + pub fn new(id: u64) -> Self { Self(id) } |
| 155 | + ``` |
| 156 | + |
| 157 | + Instead of: |
| 158 | + |
| 159 | + ``` |
| 160 | + pub fn new(id: u64) -> Self { |
| 161 | + Self(id) |
| 162 | + } |
| 163 | + ``` |
150 | 164 |
|
151 | 165 | ### Dependency Management |
152 | 166 |
|
@@ -186,6 +200,36 @@ project: |
186 | 200 | - Use GitHub-flavoured Markdown footnotes (`[^1]`) for references and |
187 | 201 | footnotes. |
188 | 202 |
|
| 203 | +## Additional tooling |
| 204 | + |
| 205 | +The following tooling is available in this environment: |
| 206 | + |
| 207 | +- `mbake` – A Makefile validator. Run using `mbake validate Makefile`. |
| 208 | +- `strace` – Traces system calls and signals made by a process; useful for debugging runtime behaviour and syscalls. |
| 209 | +- `gdb` – The GNU Debugger, for inspecting and controlling programs as they execute (or post-mortem via core dumps). |
| 210 | +- `ripgrep` – Fast, recursive text search tool (`grep` alternative) that respects `.gitignore` files. |
| 211 | +- `ltrace` – Traces calls to dynamic library functions made by a process. |
| 212 | +- `valgrind` – Suite for detecting memory leaks, profiling, and debugging low-level memory errors. |
| 213 | +- `bpftrace` – High-level tracing tool for eBPF, using a custom scripting language for kernel and application tracing. |
| 214 | +- `lsof` – Lists open files and the processes using them. |
| 215 | +- `htop` – Interactive process viewer (visual upgrade to `top`). |
| 216 | +- `iotop` – Displays and monitors I/O usage by processes. |
| 217 | +- `ncdu` – NCurses-based disk usage viewer for finding large files/folders. |
| 218 | +- `tree` – Displays directory structure as a tree. |
| 219 | +- `bat` – `cat` clone with syntax highlighting, Git integration, and paging. |
| 220 | +- `delta` – Syntax-highlighted pager for Git and diff output. |
| 221 | +- `tcpdump` – Captures and analyses network traffic at the packet level. |
| 222 | +- `nmap` – Network scanner for host discovery, port scanning, and service identification. |
| 223 | +- `lldb` – LLVM debugger, alternative to `gdb`. |
| 224 | +- `eza` – Modern `ls` replacement with more features and better defaults. |
| 225 | +- `fzf` – Interactive fuzzy finder for selecting files, commands, etc. |
| 226 | +- `hyperfine` – Command-line benchmarking tool with statistical output. |
| 227 | +- `shellcheck` – Linter for shell scripts, identifying errors and bad practices. |
| 228 | +- `fd` – Fast, user-friendly `find` alternative with sensible defaults. |
| 229 | +- `checkmake` – Linter for `Makefile`s, ensuring they follow best practices and conventions. |
| 230 | +- `srgn` – [Structural grep](https://github.com/alexpovel/srgn), searches code and enables editing by syntax tree patterns (see `docs/srgn.md` for a complete guide). |
| 231 | +- `difft` **(Difftastic)** – Semantic diff tool that compares code structure rather than just text differences. |
| 232 | + |
189 | 233 | ## Key Takeaway |
190 | 234 |
|
191 | 235 | These practices help maintain a high-quality codebase and facilitate |
|
0 commit comments