diff --git a/.vscode/settings.json b/.vscode/settings.json index e0c3d05..8937728 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,6 @@ { + "editor.insertSpaces": false, + "editor.detectIndentation": false, "rust-analyzer.checkOnSave.allTargets": false, "rust-analyzer.showUnlinkedFileNotification": false, "C_Cpp.errorSquiggles": "disabled" diff --git a/STYLE_GUIDE.md b/STYLE_GUIDE.md index 63707b3..5f2e222 100644 --- a/STYLE_GUIDE.md +++ b/STYLE_GUIDE.md @@ -5,6 +5,23 @@ This style guide has two modes that a guideline may be. `loose` means that a pr would be accepted but should later be fixed. +## Empty Functions | loose +Empty functions are typically a sign of an unfinished program or driver. + +In cases where there is a clear reason to have an empty function it will be allowed. +For example FakeAlloc is only empty functions because it is a example of an the allocator api. + +### Allowed +```rust +/// in example.hb +a := fn(): void {} +``` +### Not Allowed +```rust +/// in fat32.hb +a := fn(): void {} +``` + ## Magic Numbers | loose The policy on magic numbers is make them const and have a comment above them. Typically linking to a source of information about the magic number. @@ -16,7 +33,7 @@ This helps cut down on magic numbers while making acceptable names and atleast h $VGA_PTR := 0xB8000 ``` -## Tabs Vs Spaces | loose +## Tabs Vs Spaces | strict I prefer for hblang code to use hard tabs. The rational behind this is that a tab is `1 Indent` which some developers might want to be various different sizes when displayed