Skip to content

Commit

Permalink
feature: linter warnings and dart fix command
Browse files Browse the repository at this point in the history
  • Loading branch information
efraespada committed Oct 3, 2024
1 parent 4c66901 commit c087eaf
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 10 deletions.
4 changes: 4 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
analyzer:
errors:
dangling_library_doc_comments: ignore

include: package:flutter_lints/flutter.yaml

linter:
Expand Down
3 changes: 3 additions & 0 deletions example/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
analyzer:
errors:
dangling_library_doc_comments: ignore
include: package:flutter_lints/flutter.yaml

linter:
Expand Down
2 changes: 1 addition & 1 deletion lib/catalog.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library catalog;
library;

import 'dart:convert';
import 'dart:typed_data';
Expand Down
4 changes: 2 additions & 2 deletions lib/src/bin/tasks/tasks/catalog_task.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ class CatalogTask extends BaseTask {
}
// print('Built: ${jsonEncode(build!.toJson())}');

print('${build!.preview!.path} with classname ${className}');
map[build!.preview!.path] = build;
print('${build!.preview!.path} with classname $className');
map[build.preview!.path] = build;
}

ComponentNode? node = getNodesFrom(pageRoute, map);
Expand Down
8 changes: 8 additions & 0 deletions lib/src/bin/tasks/tasks/format_task.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,13 @@ class FormatTask extends BaseTask {
);
stdout.write(result.stdout);
stderr.write(result.stderr);

var resultFix = await Process.run(
'dart',
['fix', '--apply'],
workingDirectory: Directory.current.path,
);
stdout.write(resultFix.stdout);
stderr.write(resultFix.stderr);
}
}
1 change: 0 additions & 1 deletion lib/src/builders/catalog/component_node.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'dart:convert';

import 'package:catalog/src/base/serial.dart';
import 'package:catalog/src/builders/catalog/built_component.dart';
import 'package:catalog/src/builders/catalog/tree_element.dart';

class ComponentNode extends Serial<ComponentNode> {
String id = '';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// A collection of widgets and slivers that helps bringing hierarchical data
/// to life.
library flutter_fancy_tree_view;
library;

export 'src/folder_button.dart';
export 'src/sliver_animated_tree.dart';
Expand Down
4 changes: 0 additions & 4 deletions lib/src/embed/flutter_fanacy_tree_view/src/folder_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,6 @@ class FolderButton extends StatelessWidget {
///
/// Non-null properties of this style override the corresponding
/// properties in [_IconButtonM3.themeStyleOf] and [_IconButtonM3.defaultStyleOf].
/// [MaterialStateProperty]s that resolve to non-null values will similarly
/// override the corresponding [MaterialStateProperty]s in [_IconButtonM3.themeStyleOf]
/// and [_IconButtonM3.defaultStyleOf].
///
/// The [style] is only used for Material 3 [IconButton]. If [ThemeData.useMaterial3]
/// is set to true, [style] is preferred for icon button customization, and any
/// parameters defined in [style] will override the same parameters in [IconButton].
Expand Down
2 changes: 1 addition & 1 deletion lib/src/utils/svg.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library flutter_svg_provider;
library;

import 'dart:async';
import 'dart:io';
Expand Down
1 change: 1 addition & 0 deletions test/catalog_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ void main() {
application: Container(),
route: GoRoute(
path: '/catalog',
builder: (context, state) => Container()
),
);
expect(runner.enabled, false);
Expand Down

0 comments on commit c087eaf

Please sign in to comment.