Commit b69b313a authored by Michal  Stopyra's avatar Michal Stopyra 馃敭
Browse files


parent 3ffebc34
# Crystal Linux General Contributing Guidelines
### Pre-Commit Checks
- Make sure to format AND lint your code before every commit push
- Always make sure you're on a custom branch, never commit directly to main (Most repositories have protections against doing this).
`main` is a protected branch and should only be MRed against from other branches once the code is proven to be stable
### Formatting
#### General
- UNIX line endings (LF instead of CRLF)
- Please keep variable names descriptive (e.g., `archive` instead of `ar`)
#### Rust
- 4 spaces per indent
- Format code with `cargo fmt` before every commit
#### Python
- 4 spaces per indent
- No sloppy code! I better at LEAST see an `if __name__ == "__main__":` if your code is actually going to run as a script.
#### Nix
- 2 spaces per indent
- Check derivations/flakes with `statix`, `nix-linter` and format with `nixfmt`
### Git
- Please don't leave `Merge ...` commits. They clutter up the git log.
- All development is to take place on `main` from now on. Releases will be handled as versioned Git tags on `main`
- Please follow the [GNOME Git Commit Message Guidelines](
### Good Practices
- Make sure to annotate what each commit actually changes... `git diff` is your friend.
- Try to use handle all errors if possible.
- Never leave an unhandled exception in production code. If you have found a behaviour that runs an uncaught exception, catch the exception.
- Never use `println!()` or the langauge's default print function/macro in production code. Using prettified string functions (e.g. info() in Amethyst v3.0.0) is
- Compartmentalise as much as you can, avoid writing the exact same line of code 50 times if you can turn it into a
### Examples of these guidelines in practice
- [Amethyst](
- [Jade](
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment