TOho
TOho

Reputation: 340

ArchUnit / test architecture for Flutter or Dart

I'm developing an Flutter App using Clean Architecture. Now i'm looking for a library or something else like ArchUnit. To test the architecture and to ensure the correct access of packages.

How do you solve the problem and ensure compliance with the architecture. I would appreciate ideas or alternatives.

Upvotes: 7

Views: 482

Answers (1)

mori yuta
mori yuta

Reputation: 60

I have not found an Architest equivalent. Another way to ensure correct access to packages is to use a linter like the following

analyzer:
    plugins:
        - import_lint

import_lint:
    rules:
        use_case_rule:
            target_file_path: "/**/use_case/*_use_case.dart"
            not_allow_imports: ["/**/use_case/*_use_case.dart"]
            exclude_imports: ["/**/use_case/base_use_case.dart"]

https://github.com/kawa1214/import-lint

Upvotes: 3

Related Questions