# gleam_devutils Gleam utilities for development. For now a custom test runner and additional linter rules. ## Installation Add to your `gleam.toml`: ```toml [dependencies] gleam_devutils = "~> 0.0.1" ``` ## Functionality ### gleeunit A custom test runner that runs all tests in parallel. It's based on `gleeunit' and therefor the required modification are minimal. **Usage:** Change ```gleam import gleeunit pub fn main() -> Nil { gleeunit.main() } ``` to ```gleam import devutils/gleeunit pub fn main() -> Nil { gleeunit.main() } ``` ### glinter rules Custom linting rules for use with the `glinter` tool. #### label_possible_for_pub_fn Like the default `label_possible' rule it suggests adding labels to function parameters when they could benefit from them. _But, only if the function is public_. **Example:** ```gleam // Linter warning: Parameters 'name' and 'greeting' could benefit from labels pub fn greet(name, greeting) { greeting <> ", " <> name } // No linter warning: The function is private. fn do_greet(name, greeting) { greeting <> ", " <> name } ``` **Usage with glinter:** ```gleam // test/review.gleam import glinter import devutils/glinter/rules/label_possible_for_pub_fn pub fn main() { glinter.run(extra_rules: [label_possible_for_pub_fn.rule()]) } ``` and run with ```bash gleam run -m review ```