solid-software / solid_lints

🟧 Lints for Dart and Flutter based on software industry standards and best practices.
Other
36 stars 18 forks source link

Migrate from DCM to custom_lint package #28

Closed n-bernat closed 9 months ago

n-bernat commented 1 year ago

As the open-source DCM is discontinued we have to migrate to a different solution. custom_lint package seems like a good option as it allows us to create custom lints quite easily.

This issue is here to organise the progress of migrating from dart_code_metrics to custom_lint. There are a number of rules that have to be recreated before full migration. Some of them may have appeared as a standard lint, so they just have to be moved to a section that doesn't depend on DCM. Checklist below is divided based on the DCM config file.

Metrics:

Rules:

Anti-patterns:

DenisBogatirov commented 11 months ago

@solid-yuriiprykhodko About long-method & long-parameter-list, they are depending on source-lines-of-code and number-of-parameters metrics respectively. Since custom_lint doesn't have metrics the way those two metrics was migrated basically made them lints and implemented those two anti patterns. It needs to be checked additionally, but from the looks of it everything is ready to be released

DenisBogatirov commented 11 months ago

And also in the latest version DCM team removed anti patterns and made them regular lint rules.

illia-romanenko commented 11 months ago

@solid-yuriiprykhodko About long-method & long-parameter-list, they are depending on source-lines-of-code and number-of-parameters metrics respectively. Since custom_lint doesn't have metrics the way those two metrics was migrated basically made them lints and implemented those two anti patterns. It needs to be checked additionally, but from the looks of it everything is ready to be released

Yes that's one of the suggestions I made to DCM when they were open-source, as it didn't make sense to introduce anti-patterns/metrics from the beginning - they are better be just lint rules.

Great job on adding more lints!