Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/packages upgrade #227

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Feat/packages upgrade #227

wants to merge 6 commits into from

Conversation

mathew65
Copy link

No description provided.

@mathew65 mathew65 requested a review from petrnymsa January 14, 2025 13:28
Copy link

github-actions bot commented Jan 14, 2025

DCM report

❌ Total lint warning issues - 49

Full report: https://github.com/netglade/auto_mappr/runs/35597423040

packages/auto_mappr/pubspec.yaml Outdated Show resolved Hide resolved
packages/auto_mappr_annotation/pubspec.yaml Outdated Show resolved Hide resolved
@petrnymsa
Copy link
Member

Aktualizovat changelog

@mathew65 mathew65 requested a review from petrnymsa January 15, 2025 14:49
Comment on lines +21 to +25
prefer-boolean-prefixes: false # TODO
avoid-passing-default-values: false # TODO
avoid-commented-out-code: false # code examples in comments
prefer-single-declaration-per-file: false # TODO
prefer-named-parameters: false # TODO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rather fix all of these or ignore them in code?

// but yes, we should also add comment or resolve the avoid-non-null-assertion and avoid-nullable-interpolation disabled rules

@@ -70,6 +70,7 @@ class MapModelBodyMethodBuilder {
? mapping.whenSourceIsNullExpression!.returned
: refer('Exception').newInstance([
refer(
// ignore: avoid-adjacent-strings, to avoid parsing the errors in tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment does not describe why to ignore it here, no? Also, I would rather fix it here. (aka dont use adjacent strings)

@@ -193,6 +193,7 @@ class AutoMapprGenerator extends GeneratorForAnnotation<annotation.AutoMappr> {
),
];
})
// ignore: avoid-slow-collection-methods, fix dcm without refactoring
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment does not make sense, no? This is IMO ok to use here, since we create multiple type mappings from each .map iteration and then we need to flatten it. Maybe this would be OK and faster than this sync* function?

return [
  for (item in mappers.map())
    ...item,
];

Comment on lines +9 to +10
prefer-boolean-prefixes: false # TODO
prefer-named-parameters: false # TODO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODOs

@@ -2,6 +2,7 @@ import 'package:auto_mappr_annotation/src/field.dart';
import 'package:auto_mappr_annotation/src/type_converter.dart';

/// Configured mapping from [SOURCE] to [TARGET].
// ignore: avoid-unused-generics, dcm fix without refactoring
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the comment should be something that we use generics later in code gen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants