Developer

Custom linter rules

This package provides custom lint rules for Dart and Flutter which are used at EmbedIT Platform.

Note: This package is based on custom_lint.

Istalation

dart pub add dev:eit_custom_lints  --hosted-url=https://gitea.whitelabel.mobile.embedit.dev/api/packages/platform/pub/

!IMPORTANT You need access token for fetching from private pub repository. ELI add token automatically

Usage

To use the lints, add as a dev dependency in your pubspec.yaml:

dev_dependencies:
    custom_lints:
    eit_custom_lints:
        hosted: https://gitea.whitelabel.mobile.embedit.dev/api/packages/platform/pub/
        version: 1.0.0

Then, add an include in analysis_options.yaml:

include: package:eit_lints/analysis_options.yaml
analyzer:
  plugins:
    - custom_lint
  ...
custom_lint:
  rules:
    - amend_repository_suffix: true
    - amend_entity_suffix: true
    ...

Availabale linter rules

  • amend_repository_suffix
  • amend_entity_suffix
  • amend_model_suffix

Tools

For improving code quality we are using static analysis based on linter rules and custom linter rules. For this purposes we are using following packages:

  1. analyzer - a package which provides a library that performs static analysis of Dart code. It is useful for tool integration and embedding. This analyzer works with analysis_options.yaml file where are defined all linter rules.
  2. custom_lint_builder - a package for defining custom linter rules.
  3. analyzer_plugin - a framework for building plugins for the analysis server.

Copyright © 2025. All rights reserved.