architecture_linter 0.0.3 copy "architecture_linter: ^0.0.3" to clipboard
architecture_linter: ^0.0.3 copied to clipboard

Software analytics tool that helps developers analyse and improve project architecture structure.

architecture_linter #

Package architecture_linter helps you to keep your project right order. You can specify many rules (described below) that will be checked for suggestions and displayed in form of useful lints in your favorite IDE.

Installation #

$ dart pub add --dev architecture_linter

# or for a Flutter package
$ flutter pub add --dev architecture_linter

OR #

add it manually to pubspec.yaml

dev_dependencies:
  architecture_linter: ^0.0.1

and then run

$ dart pub get

# or for a Flutter package
$ flutter pub get

##Add plugin to analyzer

Add this fragment to analysis_option.yaml so analyzer can use plugin:


analyzer:
    plugins:
      - architecture_linter

Basic configuration #

Add configuration to analysis_options.yaml file. You can start with predefined one:

architecture_linter:
  lint_severity: warning
  
  layers:
    - &infrastructureLayer
      name: "Infrastructure"
      pathRegex:
        source: "(infrastructure)"
    - &domainLayer
      name: "Domain"
      pathRegex:
        source: "(domain)"
    - &presentationLayer
      name: "Presentation"
      pathRegex:
        source: "(presentation)"
    - &useCaseLayer
      name: "Domain/UseCases"
      pathRegex:
        source: "(domain/use_cases)"
    - &utils
      name: "Utils"
      pathRegex:
        source: "(utils)"
    - &infrastructureLayer
      name: "Infrastructure"
      pathRegex:
        source: "(infrastructure)"

  bannedImports:
    - layer: *domainLayer
      banned:
        - *presentationLayer
        - *useCaseLayer
        - *infrastructureLayer
    - layer: *presentationLayer
      banned:
        - *infrastructureLayer
    - layer: *infrastructureLayer
      banned:
        - *useCaseLayer
        - *presentationLayer
    - layer: *useCaseLayer
      banned:
        - *presentationLayer
        - *infrastructureLayer

##Configuring lint severity: To change lint severity add lint_severity entry in analysis_options.yaml under architecture_linter with one of three values:

  • info
  • warning
  • error

For example:

lint_severity: error
21
likes
0
pub points
89%
popularity

Publisher

verified publisheriteo.com

Software analytics tool that helps developers analyse and improve project architecture structure.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

analyzer, analyzer_plugin, collection, yaml

More

Packages that depend on architecture_linter