flint 2.2.0

The filesystem linter
flint-2.2.0 is not a library.

Flint

Build Status GitHub release flint crate flint documentation

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.

  1. Installation
  2. Docker image
  3. Usage
  4. Default conventions
  5. Contributing
  6. License

Installation

Using Rust

$ cargo install flint

Docker image

quay.io/bloom42/flint

$ docker run -v `pwd`:/flint quay.io/bloom42/flint:latest

Usage

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.

$ cat .flint.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]$",
  },
]

Default conventions

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]*$

Contributing

Thank you for your interest in contributing! Please refer to https://opensource.bloom.sh/contributing for guidance.

License

See LICENSE.txt and https://opensource.bloom.sh/licensing