You think there is no place in code reviews to discuss about files naming conventions ? Enforce consistent files and directories naming rules with flint: the filesystem linter.
sh
$ cargo install flint
sh
$ docker run -v `pwd`:/flint quay.io/bloom42/flint:latest
Configuration is stored in a .flint.sane (see here for more info about the SANE configuration format)
file at the root of your project (repo).
When ran, flint will recursively search upward for a configuraiton file, starting in the current directory.
bash
$ cat .flint.sane
sane
rules = [
{
pattern = "*.rs", # optional, default to "*"
convention = "snake_case", # mandatory, one the default conventions below or a Rust regex https://docs.rs/regex/1.1.4/regex/
},
{
pattern = "*.go",
convention = "^[a-z][a-z_\\d]*[a-z\\d]$",
},
]
| Name | Description |
| --------------------- | :----------------------------------------------------------------------- |
| any | Allow any filename .* |
| snake_case | Force names to respect the snake_case convention ^[a-z][a-z_\d]*[a-z\d]$ |
| kebab_case | Force names to respect the kebab-case convention ^[a-z][a-z\-\d]*[a-z\d]$ |
| upper_snake_case | Force names to respect the UPPER_SNAKE_CASE convention ^[A-Z][A-Z_\d]*$ |
| camel_case | Force names to respect the camelCase convention ^[a-z][A-Za-z\d]*$ |
| pascal_case | Force names to respect the PascalCase convention ^[A-Z][A-Za-z\d]*$ |
Thank you for your interest in contributing! Please refer to https://opensource.bloom.sh/contributing for guidance.
See LICENSE.txt and https://opensource.bloom.sh/licensing