towerops/gleam_lint.toml
Graham McIntire e54ee75513 Rewrite protobuf encoding/decoding in pure Gleam with integrated validation (#104)
Replace the protobuf hex package (agent.pb.ex) and hand-written validator
(validator.ex) with a pure Gleam implementation: wire format primitives,
all 23 message types, encode/decode functions, and validation merged into
decode. Thin Elixir wrappers in agent.ex preserve the existing struct API.

- Wire format: varint, length-delimited, double (IEEE 754 via FFI), tag encode/decode
- Types: all proto3 message types as Gleam custom types with enums and oneof
- Decode: field-level parsing with integrated validation (UUID, IP, hostname, limits)
- Encode: proto3 default omission, bytes_tree concatenation, map/repeated fields
- Wrappers: Elixir structs with encode/decode delegating to Gleam, enum atom conversion
- Remove {:protobuf, "~> 0.12"} dependency

Reviewed-on: graham/towerops-web#104
2026-03-21 16:08:40 -05:00

24 lines
613 B
TOML

[rules]
# Errors: these should fail CI
avoid_panic = "error"
avoid_todo = "error"
echo = "error"
discarded_result = "error"
division_by_zero = "error"
error_context_lost = "error"
thrown_away_error = "error"
duplicate_import = "error"
# Warnings: kept as informational
assert_ok_pattern = "warning"
unwrap_used = "warning"
redundant_case = "warning"
unnecessary_variable = "warning"
# Off: too noisy for this codebase
label_possible = "off"
missing_labels = "off"
short_variable_name = "off"
prefer_guard_clause = "off"
module_complexity = "off"
function_complexity = "off"
deep_nesting = "off"
ffi_usage = "off"