Skip to content

Commit 163f3f0

Browse files
robelatorclaude
andcommitted
+Update and format
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 13e771d commit 163f3f0

File tree

6 files changed

+50
-41
lines changed

6 files changed

+50
-41
lines changed

README.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
<a href="https://www.buymeacoffee.com/dev_cetera" target="_blank"><img align="right" src="https://cdn.buymeacoffee.com/buttons/default-orange.png" height="48"></a>
2-
<a href="https://discord.gg/gEQ8y2nfyX" target="_blank"><img align="right" src="https://raw.githubusercontent.com/dev-cetera/.github/refs/heads/main/assets/icons/discord_icon/discord_icon.svg" height="48"></a>
1+
[![banner](https://github.com/dev-cetera/df_gen_core/blob/v0.7.1/doc/assets/banner.png?raw=true)](https://github.com/dev-cetera)
32

4-
Dart & Flutter Packages by dev-cetera.com & contributors.
5-
6-
[![sponsor](https://img.shields.io/badge/sponsor-grey?logo=github-sponsors)](https://github.com/sponsors/dev-cetera)
7-
[![patreon](https://img.shields.io/badge/patreon-grey?logo=patreon)](https://www.patreon.com/c/RobertMollentze)
83
[![pub](https://img.shields.io/pub/v/df_gen_core.svg)](https://pub.dev/packages/df_gen_core)
9-
[![tag](https://img.shields.io/badge/tag-v0.7.1-purple?logo=github)](https://github.com/dev-cetera/df_gen_core/tree/v0.7.1)
10-
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/dev-cetera/df_gen_core/main/LICENSE)
4+
[![tag](https://img.shields.io/badge/Tag-v0.7.1-purple?logo=github)](https://github.com/dev-cetera/df_gen_core/tree/v0.7.1)
5+
[![buymeacoffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-FFDD00?logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/dev_cetera)
6+
[![sponsor](https://img.shields.io/badge/Sponsor-grey?logo=github-sponsors&logoColor=pink)](https://github.com/sponsors/dev-cetera)
7+
[![patreon](https://img.shields.io/badge/Patreon-grey?logo=patreon)](https://www.patreon.com/robelator)
8+
[![discord](https://img.shields.io/badge/Discord-5865F2?logo=discord&logoColor=white)](https://discord.gg/gEQ8y2nfyX)
9+
[![instagram](https://img.shields.io/badge/Instagram-E4405F?logo=instagram&logoColor=white)](https://www.instagram.com/dev_cetera/)
10+
[![license](https://img.shields.io/badge/License-MIT-blue.svg)](https://raw.githubusercontent.com/dev-cetera/df_gen_core/main/LICENSE)
1111

1212
---
1313

14-
[![banner](https://github.com/dev-cetera/df_safer_dart/blob/v0.7.1/doc/assets/banner.png?raw=true)](https://github.com/dev-cetera)
15-
1614
<!-- BEGIN _README_CONTENT -->
1715

1816
## Summary
@@ -23,7 +21,7 @@ A package that provides core utilities for practical code generation.
2321

2422
---
2523

26-
☝️ Please refer to the [API reference](https://pub.dev/documentation/df_gen_core/) for more information.
24+
🔍 For more information, refer to the [API reference](https://pub.dev/documentation/df_gen_core/).
2725

2826
---
2927

@@ -33,7 +31,6 @@ This is an open-source project, and we warmly welcome contributions from everyon
3331

3432
### ☝️ Ways you can contribute
3533

36-
- **Buy me a coffee:** If you'd like to support the project financially, consider [buying me a coffee](https://www.buymeacoffee.com/dev_cetera). Your support helps cover the costs of development and keeps the project growing.
3734
- **Find us on Discord:** Feel free to ask questions and engage with the community here: https://discord.gg/gEQ8y2nfyX.
3835
- **Share your ideas:** Every perspective matters, and your ideas can spark innovation.
3936
- **Help others:** Engage with other users by offering advice, solutions, or troubleshooting assistance.
@@ -50,6 +47,6 @@ If you're enjoying this package and find it valuable, consider showing your appr
5047

5148
<a href="https://www.buymeacoffee.com/dev_cetera" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" height="40"></a>
5249

53-
## 🧑‍⚖️ License
50+
## LICENSE
5451

5552
This project is released under the [MIT License](https://raw.githubusercontent.com/dev-cetera/df_gen_core/main/LICENSE). See [LICENSE](https://raw.githubusercontent.com/dev-cetera/df_gen_core/main/LICENSE) for more information.

analysis_options.yaml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
1-
##.title
2-
## ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
3-
##
4-
## Copyright © dev-cetera.com & contributors.
5-
##
6-
## The use of this source code is governed by an MIT-style license described in
7-
## the LICENSE file located in this project's root directory.
8-
##
9-
## See: https://opensource.org/license/mit
10-
##
11-
## ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
12-
##.title~
1+
# For dev-cetera.com
2+
# Version: 1
133

144
include: package:lints/recommended.yaml
155

@@ -31,6 +21,7 @@ linter:
3121
prefer_relative_imports: true
3222
prefer_single_quotes: true
3323
require_trailing_commas: true
24+
unawaited_futures: true
3425
unnecessary_this: true
3526

3627
analyzer:
@@ -42,21 +33,26 @@ analyzer:
4233
strict-raw-types: true
4334
exclude:
4435
- build/**
36+
# - '**.g.dart'
4537

4638
errors:
47-
unused_label: ignore
4839
always_declare_return_types: error
4940
avoid_renaming_method_parameters: error
5041
avoid_type_to_string: error
42+
close_sinks: error
43+
collection_methods_unrelated_type: error
5144
depend_on_referenced_packages: error
5245
flutter_style_todos: error
5346
invalid_override_of_non_virtual_member: error
5447
invalid_use_of_protected_member: error
48+
missing_return: error
5549
no_leading_underscores_for_local_identifiers: error
5650
prefer_final_in_for_each: error
5751
prefer_relative_imports: error
52+
record_literal_one_positional_no_trailing_comma: error
5853
unnecessary_new: error
5954
unrelated_type_equality_checks: error
55+
unused_label: ignore
6056
use_key_in_widget_constructors: error
6157

6258
formatter:

lib/src/categorize_pattern.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class CategorizedPattern<T> {
2929
//
3030
//
3131

32-
RegExp get regExp => RegExp(this.pattern);
32+
RegExp get regExp => RegExp(pattern);
3333

3434
//
3535
//

lib/src/language_support/dart_annotated_class_analyzer.dart

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ final class DartAnnotatedClassAnalyzer {
8585
fullFileUri.toString(),
8686
);
8787
if (library is LibraryElementResult) {
88-
final classElements = library.element.topLevelElements.whereType<ClassElement>();
88+
final classElements =
89+
library.element.topLevelElements.whereType<ClassElement>();
8990
for (final classElement in classElements) {
9091
final className = classElement.displayName;
9192
if (classNameFilter == null || classNameFilter.hasMatch(className)) {
@@ -140,7 +141,8 @@ final class DartAnnotatedClassAnalyzer {
140141
Set<String>? inclMemberAnnotations,
141142
) async {
142143
for (final fieldElement in classElement.fields) {
143-
if (memberNameFilter == null || memberNameFilter.hasMatch(fieldElement.displayName)) {
144+
if (memberNameFilter == null ||
145+
memberNameFilter.hasMatch(fieldElement.displayName)) {
144146
for (final fieldMetadata in fieldElement.metadata) {
145147
final memberAnnotationName = fieldMetadata.element?.displayName;
146148
if (memberAnnotationName != null &&
@@ -200,7 +202,8 @@ final class DartAnnotatedClassAnalyzer {
200202
Set<String>? inclMethodAnnotations,
201203
) async {
202204
for (final method in classElement.methods) {
203-
if (methodNameFilter == null || methodNameFilter.hasMatch(method.displayName)) {
205+
if (methodNameFilter == null ||
206+
methodNameFilter.hasMatch(method.displayName)) {
204207
for (final methodMetadata in method.metadata) {
205208
final methodAnnotationName = methodMetadata.element?.displayName;
206209
if (methodAnnotationName != null &&
@@ -217,7 +220,9 @@ final class DartAnnotatedClassAnalyzer {
217220
final fieldNames = element?.children.map((e) => e.displayName);
218221
if (fieldNames != null) {
219222
for (final fieldName in fieldNames) {
220-
final fieldValue = methodMetadata.computeConstantValue()?.getField(fieldName);
223+
final fieldValue = methodMetadata
224+
.computeConstantValue()
225+
?.getField(fieldName);
221226
if (fieldValue != null) {
222227
await onMethodAnnotationField(
223228
OnMethodAnnotationFieldParams(
@@ -301,7 +306,9 @@ final class OnAnnotatedClassParams {
301306
});
302307
}
303308

304-
typedef TOnAnnotatedClassCallback = Future<dynamic> Function(OnAnnotatedClassParams parent);
309+
typedef TOnAnnotatedClassCallback = Future<dynamic> Function(
310+
OnAnnotatedClassParams parent,
311+
);
305312

306313
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
307314

@@ -323,7 +330,8 @@ final class OnClassAnnotationFieldParams {
323330
}
324331

325332
typedef TOnClassAnnotationFieldCallback = Future<dynamic> Function(
326-
OnClassAnnotationFieldParams parent);
333+
OnClassAnnotationFieldParams parent,
334+
);
327335

328336
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
329337

@@ -342,7 +350,9 @@ final class OnAnnotatedMethodParams {
342350
});
343351
}
344352

345-
typedef TOnAnnotatedMethodCallback = Future<dynamic> Function(OnAnnotatedMethodParams parent);
353+
typedef TOnAnnotatedMethodCallback = Future<dynamic> Function(
354+
OnAnnotatedMethodParams parent,
355+
);
346356

347357
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
348358

@@ -364,7 +374,8 @@ final class OnMethodAnnotationFieldParams {
364374
}
365375

366376
typedef TOnMethodAnnotationFieldCallback = Future<dynamic> Function(
367-
OnMethodAnnotationFieldParams parent);
377+
OnMethodAnnotationFieldParams parent,
378+
);
368379

369380
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
370381

@@ -385,7 +396,9 @@ final class OnAnnotatedMemberParams {
385396
});
386397
}
387398

388-
typedef TOnAnnotatedMemberCallback = Future<dynamic> Function(OnAnnotatedMemberParams parent);
399+
typedef TOnAnnotatedMemberCallback = Future<dynamic> Function(
400+
OnAnnotatedMemberParams parent,
401+
);
389402

390403
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
391404

@@ -407,7 +420,8 @@ final class OnMemberAnnotationFieldParams {
407420
}
408421

409422
typedef TOnMemberAnnotationFieldsCallback = Future<dynamic> Function(
410-
OnMemberAnnotationFieldParams parent);
423+
OnMemberAnnotationFieldParams parent,
424+
);
411425

412426
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
413427

lib/src/replacement_producer.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class ReplacementProducer<TInsight, TPlaceholder extends Enum> {
3434

3535
Future<Map<String, String>> Function(TInsight insight) get produceReplacements =>
3636
(insight) async {
37-
final mappers = await this._getMappers();
37+
final mappers = await _getMappers();
3838
final entries = await Future.wait(
3939
mappers.map((e) async {
4040
return MapEntry(

pubspec.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@
1212

1313
name: df_gen_core
1414
homepage: https://dev-cetera.com/
15-
repository: https://github.com/dev-cetera/df_gen_core
1615
funding:
1716
- https://www.buymeacoffee.com/dev_cetera
18-
- https://www.patreon.com/c/RobertMollentze
19-
- https://github.com/sponsors/robmllze
17+
- https://www.patreon.com/c/robelator
18+
- https://github.com/sponsors/robelator
19+
- https://www.patreon.com/c/robelator
20+
- https://github.com/sponsors/robelator
21+
- https://www.buymeacoffee.com/dev_cetera
2022
description: A package that provides core utilities for practical code generation.
2123
version: 0.7.1
2224

0 commit comments

Comments
 (0)