Skip to content

Releases: navidnabavi/styl

v0.0.5

03 Jun 19:35

Choose a tag to compare

What's new in v0.0.5

New validators (E-codes)

Seven previously undetected spec violations now emit diagnostics:

  • E019 — layer missing required type field
  • E024 — layer has empty id
  • E025terrain missing source or has invalid exaggeration
  • E026 — image/video source coordinates out of bounds
  • E027light anchor/intensity/color/position invalid values
  • E028transition duration or delay is negative or non-number
  • E030ref layer points to non-existent layer (including self-references)
  • E031 — source type mismatch: layer type requires raster/raster-dem but source is neither
  • E032 — image or video source has empty url/urls

All new validators skip expression arrays to avoid false positives on data-driven properties.

New linter rules (W-codes)

  • W019 — symbol layers use text-field but no glyphs URL is defined in the style root
  • W020fog defined without explicit color (renderer falls back to default)
  • W021fog defined without explicit range (renderer falls back to default)
  • W022 — layer uses icon-image but no sprite is defined in the style root

Autofix expansion

styl lint --fix now covers two additional rules:

  • W010 — removes zero-length segments from line-dasharray (spec-invalid values)
  • W011 — migrates legacy array filters to expression syntax; handles all 8 legacy operators (==, !=, <, <=, >, >=, has, !has, in, !in, none, recursive all/any)
styl lint --fix style.json

Six rules are now fixable: W004, W007, W010, W011, W015, W016/W017.

Bug fixes

  • W003 — no longer flags sources used exclusively by terrain.source as unused
  • E022 — match expression label arrays no longer incorrectly fail expression validation

Commits

125bd3b fix(validator): skip match label arrays in E022 expression validation
f3c98cb docs: add E030, E031, E032, W022 to validators and linter docs
285d7c0 feat(linter): add W022 icon-image without sprite rule
b9f53b9 feat(validator): add E032 for image/video source with empty url/urls
bfff83a fix(validator): E031 use binding pattern, add color-relief negative test
dd36f25 feat(validator): add E031 for source type mismatch on raster/hillshade
5922274 fix(validator): E030 also catches self-referencing ref layers
366653b feat(validator): add E030 for ref pointing to non-existent layer
d933ea5 fix(linter): W003 no longer flags sources used only by terrain
d913d90 feat(linter): add W020/W021 fog missing color and range rules
d7eb73c feat(validator): fix 4 tech/design gaps from gap audit
89f2ec0 feat: implement 7 missing validators (E019, E024–E028, W019)
2a31f46 feat: add autofixes for W010 (zero dasharray) and W011 (legacy filter)
8288ede fix: resolve three validator bugs found in gap scan

v0.0.4

26 May 06:38
fb5f08b

Choose a tag to compare

What's new in v0.0.4

lint --fix autofix

styl lint --fix <file> applies safe mechanical fixes in-place without altering semantics. Four rules are now fixable:

  • W004 — sorts interpolate/step stops into ascending order
  • W007 — removes empty text-field: "" from symbol layers
  • W015 — removes paint stop values out of order
  • W016 / W017 — removes color properties shadowed by a fill-pattern (unreachable paint props)

Exit code reflects the post-fix state: if all warnings were fixed, exits 0.

styl lint --fix style.json        # fix in-place
styl lint style.json              # verify result

Curl-installable installer

New install.sh lets users install styl without Cargo or Homebrew:

curl -fsSL https://raw.githubusercontent.com/navidnabavi/styl/main/install.sh | bash

Auto-detects OS and architecture, fetches the latest release binary.

Config file renamed: .mapboxlintrc.stylrc

Breaking change. The per-project config file is now .stylrc (spec-neutral name). Rename any existing .mapboxlintrc files. Discovery still walks up the directory tree the same way.

CI & release hardening

  • cargo-audit job scans dependencies for known advisories on every push
  • MSRV pinned to Rust 1.89
  • Code coverage via Codecov
  • Dependabot enabled for Cargo and GitHub Actions
  • Homebrew formula auto-update workflow on release
  • Per-binary .sha256 checksum files now attached to every release

Dependency updates

  • thiserror 1 → 2
  • toml 0.8 → 1.1
  • serde_json 1.0.149 → 1.0.150
  • actions/checkout 4 → 6, codecov/codecov-action 4 → 6, softprops/action-gh-release 2 → 3

Community

  • Reusable GitHub Actions workflow contributed by @miladibra10

Commits

fb5f08b Merge pull request #8 from navidnabavi/dependabot/cargo/thiserror-2.0.18
129d39d build(deps): bump thiserror from 1.0.69 to 2.0.18
77b9d88 Merge pull request #5 from navidnabavi/dependabot/github_actions/actions/checkout-6
09de0ac Merge pull request #7 from navidnabavi/dependabot/cargo/toml-1.1.2spec-1.1.0
3cf3a43 Merge pull request #6 from navidnabavi/dependabot/cargo/serde_json-1.0.150
643c2f7 Merge pull request #4 from navidnabavi/dependabot/github_actions/softprops/action-gh-release-3
89d1d35 Merge pull request #3 from navidnabavi/dependabot/github_actions/codecov/codecov-action-6
f3525b2 Merge pull request #9 from miladibra10/main
1907de3 ci: add re-usable github action for workflows
7b206e7 docs: update CLAUDE.md — lint --fix command, W018 rule range, autofix doc note
7bbf972 docs(linter): document lint --fix autofix feature
b0f3ce0 test: add integration test for lint --fix autofix pipeline
7bef704 fix: lint --fix reports only fixed codes, exit code reflects post-fix state
a42a0a2 feat: add lint --fix flag to apply safe autofixes
0d54963 feat(linter): implement W015/W016/W017 autofix — remove shadowed color props
f3760e7 feat(linter): implement W007 autofix — remove empty text-field
05d539c feat(linter): implement W004 autofix — sort stops ascending
ba34ff1 feat(linter): add fix() and is_fixable() to LintRule trait
7f98365 Revert "docs: add autofix design spec for lint --fix"
f7a1fb8 docs: add autofix design spec for lint --fix
e1274dd build(deps): bump toml from 0.8.23 to 1.1.2+spec-1.1.0
a1dc2b9 build(deps): bump serde_json from 1.0.149 to 1.0.150
bf2bba0 build(deps): bump actions/checkout from 4 to 6
78d942e build(deps): bump codecov/codecov-action from 4 to 6
4fa603d build(deps): bump softprops/action-gh-release from 2 to 3
7183887 ci: add cargo-audit, MSRV (1.89), coverage, dependabot, and homebrew auto-update workflows
964cdac doc: fix features table
29d45dd docs: add E021, fix W-code range in config.md, improve CI pinning guidance
e9360e3 docs: expand CI integration with pinned version and checksum examples
33044af doc: add image assets
5d38b93 refactor: rename .mapboxlintrc to .stylrc for spec-neutral naming
ec86ab8 fix(svg): correct output formats, equalize spec labels
a7a9bd9 docs(claude): add release workflow, assets, and publishing notes
ef0051d ci: generate per-binary sha256 checksums on release
2c49741 docs: add SVG infographic, remove redundant diagnostics table from README
87a6024 docs: add brew, one-line installer, and cargo install options to README
0a8208f feat: add install.sh — curl | bash installer for all platforms

v0.0.3

22 May 00:21

Choose a tag to compare

What's new in v0.0.3

HTML output format

New --format html flag produces a self-contained HTML report with color-coded diagnostics — useful for sharing results or embedding in CI artifacts. All three subcommands (check, validate, lint) support it.

styl check --format html style.json > report.html

Spec compatibility validators (E023)

--spec mapbox mode now actively flags MapLibre-only features that are incompatible with Mapbox GL JS: sky layers, terrain, fog, and certain expression operators. Previously, spec divergence was tracked only in a static table; it now emits diagnostics at runtime.

Diagnostic module refactored

diagnostic.rs split into a focused module structure (diagnostic/mod.rs, diagnostic/renderers/). No behavior change — improves maintainability and makes adding new output formats straightforward.

Docs & project hygiene

  • README gained badges (crates.io, CI status) and a motivation section
  • CONTRIBUTING.md added with build/test/commit workflow
  • Docs updated for E023 and corrected W015 ordering

Commits

b16456a chore: bump version to 0.0.3
b797a19 chore: bump version to 0.0.2
1480fc1 docs: improve README with badges, motivation section, and crates.io metadata
e0c529a Merge pull request #1 from navidnabavi/feat/spec-wiring
9e4cf53 docs(claude): match clippy strictness to CI (-D warnings)
e7927f1 fix(clippy): use is_none_or instead of map_or(true, ..)
39c1bb7 docs(claude): enforce build/test/fmt/clippy before every commit
7f3e93d fix: stage missing cli.rs changes and fmt compat.rs
509e23c style: apply cargo fmt
6b38174 docs: add E023 spec incompatibility section; fix W015 ordering in linter.md
766d4e1 test: add spec compat integration tests (E023)
a76e98b fix(validator): correct filter logic in run_all — remove inverted ! on conflicts_with
d07fc9a feat(validator): implement compat validators for sky, terrain, fog, expressions (E023)
2273f28 refactor(validator): add spec_affinity to Validator trait; stub run_all with spec param
1978a86 docs(spec): clarify conflicts_with semantics for Spec::Both
b73503c docs: document HTML output format
c609654 fix(html): address code review findings
c55e1d5 fix: apply cargo fmt and clippy fixes to HTML module
c88895b feat: wire HTML output format into CLI
97d65f3 feat: implement HTML output renderer
93b2573 feat: add HTML renderer dependencies and CLI enum variant
0cd996d refactor: split diagnostic.rs into focused module structure
614ad97 docs: add CONTRIBUTING.md
ad708ef docs: trim README — move detail to docs/ references
cf33fbe fix(ci): move commit list generation out of matrix into prepare job
541281a fix(ci): fix aarch64-linux cross-compilation in release workflow
8aa972c fix: make layer_type optional to handle ref layers without type field
a0b0ae8 feat(linter): add W016/W017/W018 pattern-overrides-color and heatmap checks
0ab9882 chore: replace manual modulo check with is_multiple_of()
b433d6a chore: fix all clippy warnings
0b1b860 feat(linter): add W013/W014/W015 symbol and background layer checks
f082ffd feat(validator): validate inherited paint/layout on ref layers
d792ecc fix(validator): change gradient properties to Any (require expressions per spec)
5ef30b5 chore: run cargo fmt on project
7db4bfc ci(release): add commit list to release summary
4684bcb ci: improve rust and release workflows
0e7e14e test(validator): add missing PropType::Array unit tests for E018
1ce27d4 docs(validators): add E018 paint/layout value validation
cbf45e6 fix(validator): guard E018 against unknown props and Array-typed expression false positives
0ca3881 feat(validator): wire paint/layout value validation, emit E018
71d62b4 feat(validator): add PropType table and validate_prop_value for E018
7316b45 build: add csscolorparser for paint value color validation
177eced feat(validator): fill all known spec gaps (E011–E017)
084c269 fix: add release name to binray (os+arch)
2fd129e fix: binary name for release
dfb7cfb fix: edition for cargo
b3ece54 chore: add release pipeline
8a871ac fix: set version and edition
09af07f chore: GitHub Actions workflow for Rust project
4a0953a docs: fix review findings in docs and README
8905da1 fix(formatter): remove dead Context::Root variant
808acfd chore: rename project to styl
a98f373 fix: correct 5 critical spec compliance bugs and add missing types/operators
8bd9dfd feat: add lib crate, spec divergence table, fixtures, integration tests
4db03b6 feat(config): .mapboxlintrc TOML discovery and severity override parsing
b31ade5 feat(formatter): canonical key ordering, paint/layout sort, --check mode
8e9080d feat(linter): implement W001-W012 lint rules
7e44a5a feat(expression): add expression AST validator with arity checks and depth warning
8b58904 feat(validator): add root, source, layer, and cross-ref validators
f2b40a0 feat(style): add serde types for Style, Source variants, and Layer
4d247a1 feat: scaffold project with CLI, Diagnostic type, and module stubs

v0.0.2

12 May 22:52

Choose a tag to compare

What's new in v0.0.2

Expanded validator coverage (E011–E018)

Seven new error codes covering previously undetected spec violations:

  • E011–E017 fill gaps in the MapLibre v8 spec: missing required fields, invalid enum values, malformed source/layer combinations, and more
  • E018 validates paint and layout property value types — catches wrong types (string where number expected, etc.) and invalid CSS color strings using a full color parser

Ref layer validation

Layers that use ref to inherit from another layer are now validated: paint and layout properties are checked against the referenced layer's type, not skipped. Previously, ref layers were largely invisible to the validator.

Fix: ref layers without explicit type

Ref layers legally omit type (they inherit it). The validator no longer emits a false-positive type-missing error for these layers.

New linter rules (W013–W018)

Six new warning codes for best-practice checks:

  • W013 — symbol layer missing text-field or icon-image (empty symbol layer)
  • W014 — background layer with fully transparent color (invisible layer)
  • W015 — paint stop values out of order in step/interpolate expressions
  • W016 — color property overridden by a pattern fill (pattern makes the color unreachable)
  • W017 — same for line layers
  • W018 — heatmap layer missing heatmap-color expression (defaults to invisible output)

Commits

70b9691 fix(ci): move commit list generation out of matrix into prepare job
95cf91a fix(ci): fix aarch64-linux cross-compilation in release workflow
4b3a3b3 fix: make layer_type optional to handle ref layers without type field
c389859 feat(linter): add W016/W017/W018 pattern-overrides-color and heatmap checks
6cacbda chore: replace manual modulo check with is_multiple_of()
6637561 chore: fix all clippy warnings
c9bac49 feat(linter): add W013/W014/W015 symbol and background layer checks
c9f3cc8 feat(validator): validate inherited paint/layout on ref layers
40381be fix(validator): change gradient properties to Any (require expressions per spec)
b1d33df chore: run cargo fmt on project
fcdf4f2 ci(release): add commit list to release summary
cbf2c67 ci: improve rust and release workflows
0152894 test(validator): add missing PropType::Array unit tests for E018
b5e8482 docs(validators): add E018 paint/layout value validation
2275c9a fix(validator): guard E018 against unknown props and Array-typed expression false positives
3af07f7 feat(validator): wire paint/layout value validation, emit E018
c6b0b86 feat(validator): add PropType table and validate_prop_value for E018
661b42e build: add csscolorparser for paint value color validation
107504a feat(validator): fill all known spec gaps (E011–E017)

v0.0.1

11 May 07:59

Choose a tag to compare

Commits:

9f85683 (tag: v0.0.1) fix: add release name to binray (os+arch)
865ac14 fix: binary name for release
cb29cd8 fix: edition for cargo
9e9c415 chore: add release pipeline
01ea148 fix: set version and edition
22d8daf chore: GitHub Actions workflow for Rust project
4a0953a docs: fix review findings in docs and README
8905da1 fix(formatter): remove dead Context::Root variant
808acfd (https/master, master) chore: rename project to styl
a98f373 fix: correct 5 critical spec compliance bugs and add missing types/operators
8bd9dfd feat: add lib crate, spec divergence table, fixtures, integration tests
4db03b6 feat(config): .mapboxlintrc TOML discovery and severity override parsing
b31ade5 feat(formatter): canonical key ordering, paint/layout sort, --check mode
8e9080d feat(linter): implement W001-W012 lint rules
7e44a5a feat(expression): add expression AST validator with arity checks and depth warning
8b58904 feat(validator): add root, source, layer, and cross-ref validators
f2b40a0 feat(style): add serde types for Style, Source variants, and Layer
4d247a1 feat: scaffold project with CLI, Diagnostic type, and module stubs