Skip to content

Configuration file

gapline reads its configuration from TOML files. Unknown keys are rejected: a typo in a section or field produces a parse error with the path to the offending file. See getting started / configuration for how the lookup chain works.

This page documents every accepted key. Some are forward-compatible stubs — they deserialize cleanly but are not yet read by any runtime code. They are documented for completeness and will become live as the features land.

[default]
[validation]
[validation.thresholds.speed_limits]
[validation.thresholds.distances]
[validation.thresholds.time]
[validation.thresholds.coordinates]
[validation.thresholds.calendar]
[validation.thresholds.naming]
[performance]
[output]
[batch]
[experimental]

Any section can be omitted — every key has a default.

Defaults for CLI arguments that can be omitted from the command line.

KeyTypeDefaultDescription
feedpathFeed path used when --feed is omitted. Accepts a ZIP archive or directory.
formatstringOutput format: text, json, csv, xml, html. Overridden by --format.
outputpathOutput destination when --output is omitted. Per-command.

Rule selection and high-level behaviour.

KeyTypeDefaultDescription
min_severityerror|warning|infoFilter out findings below this level. Overridden by --min-severity.
disabled_rulesarray of string[]Rule IDs to skip. CLI --disable-rule appends to this list.
max_rowsintegerMaximum data rows per file (consumed by TooManyRowsRule). Omit to disable the check.
fail_fastbooleanfalseForward-compat. Not yet wired.
max_errors_per_ruleintegerForward-compat. Not yet wired.
enabled_rulesarray of string[]Forward-compat. Not yet wired. When non-empty, will pin the rule set.

Per-route-type maximum speeds in km/h. Consumed by speed_validation.

KeyTypeDefaultApplies to route_type
tram_kmhnumber150.00
subway_kmhnumber150.01
rail_kmhnumber500.02
bus_kmhnumber150.03
ferry_kmhnumber150.04
cable_tram_kmhnumber30.05
aerial_lift_kmhnumber50.06
funicular_kmhnumber50.07
trolleybus_kmhnumber150.011
monorail_kmhnumber150.012
default_kmhnumber150.0Extended/unknown route types

Every value must be a finite number strictly greater than zero.

Distance thresholds in metres.

KeyTypeDefaultDescription
max_stop_to_shape_distance_mnumber100.0Max allowed distance from a stop to its nearest shape point.
min_shape_point_distance_mnumber1.11Minimum spacing between consecutive shape points.
shape_dist_incoherence_rationumber0.5Tolerance for shape_dist_traveled mismatch. Must be in [0, 1].
max_transfer_distance_mnumber10000.0Upper bound on transfers.min_transfer_time-derived distance.
transfer_distance_warning_mnumber2000.0Warning threshold. Must be ≤ max_transfer_distance_m.

All values must be finite and non-negative.

KeyTypeDefaultDescription
max_trip_duration_hoursinteger24Maximum allowed trip duration. Omit to disable the check. Must be > 0 when set.
KeyTypeDefaultDescription
min_distance_from_origin_mnumber1000.0Reject coordinates closer than this to 0/0.
min_distance_from_poles_mnumber1000.0Reject coordinates closer than this to either pole.
KeyTypeDefaultDescription
min_feed_coverage_daysinteger30Minimum calendar coverage. Must be > 0.
feed_expiration_warning_daysinteger7Warn when the feed expires in fewer days than this.
min_trip_activity_daysinteger7Flag trips active on fewer days than this.
KeyTypeDefaultDescription
max_route_short_name_lengthinteger12Warn when route_short_name exceeds this many characters. Must be > 0.
KeyTypeDefaultDescription
num_threadsintegerWorker pool size. Auto-detected when omitted. Overridden by --threads.
csv_buffer_sizeinteger8192CSV reader buffer size in bytes.
parallel_parsingbooleantrueForward-compat. Not yet wired.
parallel_validationbooleantrueForward-compat. Not yet wired.
KeyTypeDefaultDescription
force_colorbooleanfalseForce ANSI colors. Overridden by --force-color.
no_colorbooleanfalseSuppress ANSI colors. Overridden by --no-color.
show_progressbooleantrueWhether to render per-group progress bars during validation.
verbosityquiet | normal | verbosenormalLog verbosity.
timestamp_formatnone | iso8601 | unix | relativenoneTimestamp style in report headers.
group_by_filebooleantrueGroup findings by file_name in the text report.
group_by_rulebooleanfalseGroup findings by rule_id in the text report.
KeyTypeDefaultDescription
continue_on_errorbooleanfalsePlanned: keep running after a failed directive in .gl scripts.
echo_commandsbooleantruePlanned: print each directive to stderr before execution.
KeyTypeDefaultDescription
enabledbooleanfalseMaster switch.
validate_flexbooleanfalsePlanned GTFS-Flex validation.
validate_fares_v2booleanfalsePlanned GTFS Fares v2 validation.
validate_geojsonbooleanfalsePlanned GeoJSON shape validation.
gapline.toml
[default]
feed = "./data/gtfs.zip"
format = "json"
output = "./reports/latest.json"
[validation]
disabled_rules = ["block_id_trip_overlap"]
min_severity = "warning"
max_rows = 5_000_000
[validation.thresholds.speed_limits]
rail_kmh = 320
bus_kmh = 120
[validation.thresholds.distances]
max_transfer_distance_m = 5000
transfer_distance_warning_m = 1500
[validation.thresholds.calendar]
min_feed_coverage_days = 60
feed_expiration_warning_days = 14
[performance]
num_threads = 4
csv_buffer_size = 32_768
[output]
show_progress = true
group_by_rule = true
verbosity = "normal"
timestamp_format = "iso8601"
  • A missing config file (any of the three lookup layers) is silently skipped.
  • A file that exists but cannot be read (permission denied, I/O error) aborts with exit code 3.
  • A file that parses to invalid TOML, or contains an unknown key, aborts with exit code 2 and a message that includes the path and the offending token.
  • A semantically invalid value (negative speed, zero calendar coverage, incoherent thresholds) aborts with exit code 2 and a message that cites the specific field.

See concepts / exit codes.