Skip to content

Commit

Permalink
fix: liniting error in templates
Browse files Browse the repository at this point in the history
  • Loading branch information
jtdLab committed Aug 25, 2023
1 parent e3ae480 commit 483a9f5
Show file tree
Hide file tree
Showing 21 changed files with 52 additions and 45 deletions.
4 changes: 3 additions & 1 deletion bricks/infrastructure_package/__brick__/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ targets:
builders:
source_gen:combining_builder:
options:
preamble: "// coverage:ignore-file"
preamble: |
// ignore_for_file: type=lint
// coverage:ignore-file
36 changes: 18 additions & 18 deletions bricks/logging_package/__brick__/test/src/logger_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void main() {
);

// Act
{{project_name.camelCase()}}LoggerDevelopment.verbose('foo', {'code': 404}, MockStackTrace());
{{project_name.camelCase()}}LoggerDevelopment.verbose('foo', {'code': 404}, MockStackTrace(),);

// Assert
verifyNever(() => logCommand(any()));
Expand All @@ -125,7 +125,7 @@ void main() {

// Act
final stackTrace = MockStackTrace();
{{project_name.camelCase()}}LoggerDevelopment.debug('foo', {'code': 404}, stackTrace);
{{project_name.camelCase()}}LoggerDevelopment.debug('foo', {'code': 404}, stackTrace,);

// Assert
verify(
Expand Down Expand Up @@ -168,7 +168,7 @@ void main() {

// Act
final stackTrace = MockStackTrace();
{{project_name.camelCase()}}LoggerDevelopment.info('foo', {'code': 404}, stackTrace);
{{project_name.camelCase()}}LoggerDevelopment.info('foo', {'code': 404}, stackTrace,);

// Assert
verify(
Expand Down Expand Up @@ -211,7 +211,7 @@ void main() {

// Act
final stackTrace = MockStackTrace();
{{project_name.camelCase()}}LoggerDevelopment.warning('foo', {'code': 404}, stackTrace);
{{project_name.camelCase()}}LoggerDevelopment.warning('foo', {'code': 404}, stackTrace,);

// Assert
verify(
Expand Down Expand Up @@ -254,7 +254,7 @@ void main() {

// Act
final stackTrace = MockStackTrace();
{{project_name.camelCase()}}LoggerDevelopment.error('foo', {'code': 404}, stackTrace);
{{project_name.camelCase()}}LoggerDevelopment.error('foo', {'code': 404}, stackTrace,);

// Assert
verify(
Expand Down Expand Up @@ -297,7 +297,7 @@ void main() {

// Act
final stackTrace = MockStackTrace();
{{project_name.camelCase()}}LoggerDevelopment.wtf('foo', {'code': 404}, stackTrace);
{{project_name.camelCase()}}LoggerDevelopment.wtf('foo', {'code': 404}, stackTrace,);

// Assert
verify(
Expand Down Expand Up @@ -341,7 +341,7 @@ void main() {
);

// Act
{{project_name.camelCase()}}LoggerTest.verbose('foo', {'code': 404}, MockStackTrace());
{{project_name.camelCase()}}LoggerTest.verbose('foo', {'code': 404}, MockStackTrace(),);

// Assert
verifyNever(() => logCommand(any()));
Expand All @@ -358,7 +358,7 @@ void main() {

// Act
final stackTrace = MockStackTrace();
{{project_name.camelCase()}}LoggerTest.debug('foo', {'code': 404}, stackTrace);
{{project_name.camelCase()}}LoggerTest.debug('foo', {'code': 404}, stackTrace,);

// Assert
verify(
Expand Down Expand Up @@ -401,7 +401,7 @@ void main() {

// Act
final stackTrace = MockStackTrace();
{{project_name.camelCase()}}LoggerTest.info('foo', {'code': 404}, stackTrace);
{{project_name.camelCase()}}LoggerTest.info('foo', {'code': 404}, stackTrace,);

// Assert
verify(
Expand Down Expand Up @@ -444,7 +444,7 @@ void main() {

// Act
final stackTrace = MockStackTrace();
{{project_name.camelCase()}}LoggerTest.warning('foo', {'code': 404}, stackTrace);
{{project_name.camelCase()}}LoggerTest.warning('foo', {'code': 404}, stackTrace,);

// Assert
verify(
Expand Down Expand Up @@ -487,7 +487,7 @@ void main() {

// Act
final stackTrace = MockStackTrace();
{{project_name.camelCase()}}LoggerTest.error('foo', {'code': 404}, stackTrace);
{{project_name.camelCase()}}LoggerTest.error('foo', {'code': 404}, stackTrace,);

// Assert
verify(
Expand Down Expand Up @@ -530,7 +530,7 @@ void main() {

// Act
final stackTrace = MockStackTrace();
{{project_name.camelCase()}}LoggerTest.wtf('foo', {'code': 404}, stackTrace);
{{project_name.camelCase()}}LoggerTest.wtf('foo', {'code': 404}, stackTrace,);

// Assert
verify(
Expand Down Expand Up @@ -574,7 +574,7 @@ void main() {
);

// Act
{{project_name.camelCase()}}LoggerProduction.verbose('foo', {'code': 404}, MockStackTrace());
{{project_name.camelCase()}}LoggerProduction.verbose('foo', {'code': 404}, MockStackTrace(),);

// Assert
verifyNever(() => logCommand(any()));
Expand All @@ -591,7 +591,7 @@ void main() {

// Act
final stackTrace = MockStackTrace();
{{project_name.camelCase()}}LoggerProduction.debug('foo', {'code': 404}, stackTrace);
{{project_name.camelCase()}}LoggerProduction.debug('foo', {'code': 404}, stackTrace,);

// Assert
verify(
Expand Down Expand Up @@ -634,7 +634,7 @@ void main() {

// Act
final stackTrace = MockStackTrace();
{{project_name.camelCase()}}LoggerProduction.info('foo', {'code': 404}, stackTrace);
{{project_name.camelCase()}}LoggerProduction.info('foo', {'code': 404}, stackTrace,);

// Assert
verify(
Expand Down Expand Up @@ -677,7 +677,7 @@ void main() {

// Act
final stackTrace = MockStackTrace();
{{project_name.camelCase()}}LoggerProduction.warning('foo', {'code': 404}, stackTrace);
{{project_name.camelCase()}}LoggerProduction.warning('foo', {'code': 404}, stackTrace,);

// Assert
verify(
Expand Down Expand Up @@ -720,7 +720,7 @@ void main() {

// Act
final stackTrace = MockStackTrace();
{{project_name.camelCase()}}LoggerProduction.error('foo', {'code': 404}, stackTrace);
{{project_name.camelCase()}}LoggerProduction.error('foo', {'code': 404}, stackTrace,);

// Assert
verify(
Expand Down Expand Up @@ -763,7 +763,7 @@ void main() {

// Act
final stackTrace = MockStackTrace();
{{project_name.camelCase()}}LoggerProduction.wtf('foo', {'code': 404}, stackTrace);
{{project_name.camelCase()}}LoggerProduction.wtf('foo', {'code': 404}, stackTrace,);

// Assert
verify(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void main() {
final {{project_name.camelCase()}}App = tester.widget<{{project_name.pascalCase()}}App>(
find.byWidgetPredicate((widget) => widget is {{project_name.pascalCase()}}App),
);
expect({{project_name.camelCase()}}App.supportedLocales, {{project_name.pascalCase()}}Localizations.supportedLocales);
expect({{project_name.camelCase()}}App.supportedLocales, {{project_name.pascalCase()}}Localizations.supportedLocales,);
expect(
{{project_name.camelCase()}}App.localizationsDelegates,
contains({{project_name.pascalCase()}}Localizations.delegate),
Expand Down Expand Up @@ -120,8 +120,8 @@ void main() {
final {{project_name.camelCase()}}App = tester.widget<{{project_name.pascalCase()}}App>(
find.byWidgetPredicate((widget) => widget is {{project_name.pascalCase()}}App),
);
expect({{project_name.camelCase()}}App.locale, {{project_name.pascalCase()}}Localizations.supportedLocales.first);
expect({{project_name.camelCase()}}App.supportedLocales, {{project_name.pascalCase()}}Localizations.supportedLocales);
expect({{project_name.camelCase()}}App.locale, {{project_name.pascalCase()}}Localizations.supportedLocales.first,);
expect({{project_name.camelCase()}}App.supportedLocales, {{project_name.pascalCase()}}Localizations.supportedLocales,);
expect(
{{project_name.camelCase()}}App.localizationsDelegates,
contains({{project_name.pascalCase()}}Localizations.delegate),
Expand Down Expand Up @@ -182,8 +182,8 @@ void main() {
find.byWidgetPredicate((widget) => widget is {{project_name.pascalCase()}}App),
);
expect({{project_name.camelCase()}}App.home, widget);
expect({{project_name.camelCase()}}App.locale, {{project_name.pascalCase()}}Localizations.supportedLocales.first);
expect({{project_name.camelCase()}}App.supportedLocales, {{project_name.pascalCase()}}Localizations.supportedLocales);
expect({{project_name.camelCase()}}App.locale, {{project_name.pascalCase()}}Localizations.supportedLocales.first,);
expect({{project_name.camelCase()}}App.supportedLocales, {{project_name.pascalCase()}}Localizations.supportedLocales,);
expect(
{{project_name.camelCase()}}App.localizationsDelegates,
contains({{project_name.pascalCase()}}Localizations.delegate),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import 'package:{{project_name}}_ui_{{platform}}/{{project_name}}_ui_{{platform}
/// The [providers] parameter enables injection of blocs or cubits
/// into the widget tree above [widget].
///
/// Set the [withScaffold] option to wrap [widget] with an [{{project_name.pascalCase()}}Scaffold].
/// Set the [withScaffold] option to wrap [widget] with a
/// [{{project_name.pascalCase()}}Scaffold].
/// This is particularly useful when testing subwidgets within a page or flow.
Widget appWrapper({
Locale? locale,
Expand Down
4 changes: 2 additions & 2 deletions bricks/platform_localization_package/__brick__/l10n.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ output-localization-file: {{project_name}}_localizations.dart
nullable-getter: false
synthetic-package: false
header: |
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: type=lint
// coverage:ignore-file
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import 'package:{{project_name}}_ui_{{platform}}/{{project_name}}_ui_{{platform}
/// The [providers] parameter enables injection of blocs or cubits
/// into the widget tree above [widget].
///
/// Set the [withScaffold] option to wrap [widget] with an [{{project_name.pascalCase()}}Scaffold].
/// Set the [withScaffold] option to wrap [widget] with a
/// [{{project_name.pascalCase()}}Scaffold].
/// This is particularly useful when testing subwidgets within a page or flow.
Widget appWrapper({
Locale? locale,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:mocktail/mocktail.dart';

import 'mocks.dart';

{{project_name.pascalCase()}}BlocObserver _get{{project_name.pascalCase()}}BlocObserver({{project_name.pascalCase()}}Logger logger) {
{{project_name.pascalCase()}}BlocObserver _get{{project_name.pascalCase()}}BlocObserver({{project_name.pascalCase()}}Logger logger,) {
return {{project_name.pascalCase()}}BlocObserver(logger);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:mocktail/mocktail.dart';

import 'mocks.dart';

{{project_name.pascalCase()}}RouterObserver _get{{project_name.pascalCase()}}RouterObserver({{project_name.pascalCase()}}Logger logger) {
{{project_name.pascalCase()}}RouterObserver _get{{project_name.pascalCase()}}RouterObserver({{project_name.pascalCase()}}Logger logger,) {
return {{project_name.pascalCase()}}RouterObserver(logger);
}

Expand Down Expand Up @@ -79,7 +79,7 @@ void main() {
final {{project_name.camelCase()}}RouterObserver = _get{{project_name.pascalCase()}}RouterObserver(logger);

// Act
{{project_name.camelCase()}}RouterObserver.didInitTabRoute(makeTabPageRoute('MyRoute'), null);
{{project_name.camelCase()}}RouterObserver.didInitTabRoute(makeTabPageRoute('MyRoute'), null,);

// Assert
verify(() => logger.debug('Tab route visited: MyRoute'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import 'package:{{project_name}}_ui_{{platform}}/{{project_name}}_ui_{{platform}
/// The [providers] parameter enables injection of blocs or cubits
/// into the widget tree above [widget].
///
/// Set the [withScaffold] option to wrap [widget] with an [{{project_name.pascalCase()}}Scaffold].
/// Set the [withScaffold] option to wrap [widget] with a
/// [{{project_name.pascalCase()}}Scaffold].
/// This is particularly useful when testing subwidgets within a page or flow.
Widget appWrapper({
Locale? locale,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import 'package:{{project_name}}_ui_{{platform}}/{{project_name}}_ui_{{platform}
/// The [providers] parameter enables injection of blocs or cubits
/// into the widget tree above [widget].
///
/// Set the [withScaffold] option to wrap [widget] with an [{{project_name.pascalCase()}}Scaffold].
/// Set the [withScaffold] option to wrap [widget] with a
/// [{{project_name.pascalCase()}}Scaffold].
/// This is particularly useful when testing subwidgets within a page or flow.
Widget appWrapper({
Locale? locale,
Expand Down
3 changes: 2 additions & 1 deletion bricks/ui_package/__brick__/lib/{{project_name}}_ui.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/// Widgets and themes implementing platform independent {{project_name.titleCase()}} design language.
/// Widgets and themes implementing platform independent
/// {{project_name.titleCase()}} design language.
///
/// To use, import `package:{{project_name}}_ui/{{project_name}}_ui.dart`.
library {{project_name}}_ui;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Loading

0 comments on commit 483a9f5

Please sign in to comment.