STYLE: extern and use statements rules

This commit is contained in:
Emma Tebibyte 2024-07-19 16:41:02 -06:00
parent 9f2447ce94
commit 3ba6682ab3
Signed by: emma
GPG Key ID: 06FA419A1698C270

13
STYLE
View File

@ -1,6 +1,8 @@
0. Braces are mandatory for all control flow, as it improves the visibility of
scope.
1. Nested indentation should be kept to a minimum.
2. Empty lines should be placed between different kinds of statements:
int t;
@ -69,6 +71,17 @@
#include <unistd.h> /* close(2), getopt(3), lseek(2), read(2), write(2),
* optarg, optind, STDIN_FILENO, STDOUT_FILENO */
10. In Rust, place extern statements after use statements that include standard
library crates. Group alike statements:
use std::fs::Path;
extern crate strerror;
extern crate sysexits;
use strerror::StrError;
use sysexits::{ EX_OSERR, EX_USAGE };
--
Copyright © 2024 Emma Tebibyte <emma@tebibyte.media>