Skip to main content

synthex_lint 0.1.0 copy "synthex_lint: ^0.1.0" to clipboard
synthex_lint: ^0.1.0 copied to clipboard

Analyzer plugin shipping synthex lint rules (analysis_server_plugin API).

0.1.0 - 2026-09-27 #

Initial release: an analyzer plugin that ships three schema-driven rules, built on the official analysis_server_plugin API.

  • One configuration document for every rule: synthex_lint.{yaml,yml,json} in the package root, or the synthex_lint key of pubspec.yaml. A dedicated file wins over the pubspec key, and a document key that names no rule section and is not version or severity is reported instead of silently ignored. The document sets the severity a rule section falls back to.
  • architecture: layer boundaries and forbidden imports, with severities per layer, per check kind (mayImport / forbiddenImports), and per forbidden-import pattern.
  • encapsulation: conventions for a family of classes selected by file glob, supertype, class name, or annotation — private instance fields, final private fields, no public setters, a public getter for every private field — with a severity per requirement.
  • placement: where a class lives decides what it is — the name suffix it must carry, the supertype it must have or must not have, exempt patterns for generated code, and a per-placement severity.
  • Quick fixes: AddSupertype adds the supertype a placement violation names, appending to the class's implements clause or creating it.
  • A rule reports under one diagnostic code at every severity, so a single // ignore: <code> comment covers it however it is configured.
  • Rules are declared syntax-only (canUseParsedResult), so the plugin analyzes the parsed library and keeps reporting while a file does not compile; compiled glob patterns are cached.
  • The example consumer (examples/consumer) enables the plugin and ships deliberate violations for every rule.
1
likes
150
points
354
downloads

Documentation

API reference

Publisher

verified publisherkhode.io

Weekly Downloads

Analyzer plugin shipping synthex lint rules (analysis_server_plugin API).

Repository (GitHub)

License

BSD-3-Clause (license)

Dependencies

analysis_server_plugin, analyzer, analyzer_plugin, glob, path, yaml

More

Packages that depend on synthex_lint