Current section
Files
Jump to
Current section
Files
gleam.toml
name = "glinter"
version = "2.19.2"
description = "A linter for the Gleam programming language"
licences = ["MIT"]
repository = { type = "github", user = "pairshaped", repo = "glinter" }
links = [
{ title = "llms.txt", href = "https://raw.githubusercontent.com/pairshaped/glinter/master/llms.txt" },
]
[dependencies]
gleam_stdlib = ">= 0.44.0 and < 2.0.0"
glance = ">= 6.0.0 and < 8.0.0"
simplifile = ">= 2.0.0 and < 3.0.0"
argv = ">= 1.0.0 and < 2.0.0"
tom = ">= 1.0.0 and < 3.0.0"
gleam_json = ">= 3.0.0 and < 4.0.0"
[dev-dependencies]
gleeunit = ">= 1.0.0 and < 2.0.0"
# glinter configuration
# Set rules to "error", "warning", or "off"
[tools.glinter.rules]
avoid_panic = "error"
avoid_todo = "error"
echo = "warning"
assert_ok_pattern = "warning"
discarded_result = "warning"
short_variable_name = "warning"
unnecessary_variable = "warning"
redundant_case = "warning"
unwrap_used = "warning"
deep_nesting = "warning"
function_complexity = "warning"
module_complexity = "warning"
prefer_guard_clause = "warning"
missing_labels = "warning"
label_possible = "warning"
unused_exports = "warning"
missing_type_annotation = "warning"
todo_without_message = "warning"
unqualified_import = "warning"
panic_without_message = "warning"
string_inspect = "warning"
duplicate_import = "warning"
thrown_away_error = "warning"
trailing_underscore = "warning"
unnecessary_string_concatenation = "warning"
error_context_lost = "warning"
stringly_typed_error = "warning"
ffi_usage = "off"
# Ignore rules for specific file patterns
[tools.glinter.ignore]
# Rule check functions match a callback signature, so labels aren't applicable
"src/glinter/rules/*.gleam" = ["label_possible"]
# AST traversal code is inherently complex — suppress complexity warnings
"src/glinter.gleam" = ["label_possible"]
"src/glinter/rule.gleam" = ["deep_nesting", "function_complexity", "label_possible"]
"src/glinter/analysis.gleam" = ["deep_nesting", "function_complexity"]
"src/glinter/reporter.gleam" = ["label_possible"]
"src/glinter/ignore.gleam" = ["label_possible"]
"src/glinter/config.gleam" = ["deep_nesting"]
"src/glinter/rules/deep_nesting.gleam" = ["deep_nesting", "function_complexity"]
"src/glinter/rules/missing_labels.gleam" = ["deep_nesting", "function_complexity", "prefer_guard_clause"]
"src/glinter/unused_exports.gleam" = ["deep_nesting", "function_complexity", "module_complexity", "label_possible"]