#bloom #lint #linter #fs #ci

app flint

The filesystem linter

5 releases (3 stable)

2.2.0 Apr 21, 2019
2.1.0 Apr 8, 2019
2.0.0 Apr 1, 2019
0.1.1 Mar 27, 2019
0.1.0 Mar 27, 2019

#1281 in Development tools

Download history 10/week @ 2023-10-30 2/week @ 2023-11-13 11/week @ 2023-11-20 17/week @ 2023-11-27 5/week @ 2023-12-18 10/week @ 2023-12-25 6/week @ 2024-01-08 4/week @ 2024-01-15 7/week @ 2024-01-22 20/week @ 2024-01-29 2/week @ 2024-02-05 23/week @ 2024-02-12

52 downloads per month

Apache-2.0

195KB
1.5K SLoC

Go 1K SLoC // 0.1% comments Rust 176 SLoC // 0.0% comments

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

Dependencies

~5–7MB
~124K SLoC