knex_dart_lint 0.1.0
knex_dart_lint: ^0.1.0 copied to clipboard
Optional custom_lint plugin for dialect-aware Knex Dart capability checks.
knex_dart_lint #
Optional custom_lint plugin for knex_dart.
This package provides dialect-aware warnings for query APIs that are unsupported for the inferred driver.
Rule Catalog #
Dialect capability rules #
dialect_unsupported_returningdialect_unsupported_full_outer_joindialect_unsupported_lateral_joindialect_unsupported_on_conflict_mergedialect_unsupported_ctedialect_unsupported_window_functionsdialect_unsupported_jsondialect_unsupported_intersect_except
Query argument correctness rules #
invalid_where_operatorwhere_null_valueinvalid_order_directionlimit_non_int_argumentinsert_wrong_value_typewhere_null_typed_value
Enable #
Add to your app/package pubspec.yaml:
dev_dependencies:
custom_lint: ^0.7.0
knex_dart_lint:
path: ../packages/knex_dart_lint
Then update analysis_options.yaml:
analyzer:
plugins:
- custom_lint
Run #
dart run custom_lint
Confidence behavior #
Dialect capability rules emit diagnostics only when dialect inference is high-confidence. If inference is unknown, those rules intentionally stay silent.
Troubleshooting #
If CLI works but IDE does not show diagnostics:
- Confirm
analysis_options.yamlincludesanalyzer.plugins: [custom_lint]. - Run
dart pub getin the workspace and the consuming app. - Ensure the IDE can resolve
dartfrom its environmentPATH. - Open the
custom_lint.logfrom the IDE and check for process spawn errors.
See docs/mvp_rules.md for the locked rule contract.