Skip to content

Commit

Permalink
Enable and fix new lints (#1274)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo authored Jan 31, 2023
1 parent bccf4b3 commit 217f21e
Show file tree
Hide file tree
Showing 32 changed files with 50 additions and 3 deletions.
2 changes: 2 additions & 0 deletions _test_yaml/test/ensure_build_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

@TestOn('vm')
@Tags(['presubmit-only'])
library test;

import 'package:build_verify/build_verify.dart';
import 'package:test/test.dart';

Expand Down
2 changes: 2 additions & 0 deletions _test_yaml/test/yaml_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.

@TestOn('vm')
library test;

import 'dart:io';

import 'package:_json_serial_shared_test/shared_test.dart';
Expand Down
8 changes: 8 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@ linter:
- avoid_void_async
- cancel_subscriptions
- cascade_invocations
- collection_methods_unrelated_type
- combinators_ordering
- comment_references
- dangling_library_doc_comments
- directives_ordering
- implicit_call_tearoffs
- join_return_with_assignment
- library_annotations
- lines_longer_than_80_chars
- literal_only_boolean_expressions
- missing_whitespace_between_adjacent_strings
Expand All @@ -40,10 +45,13 @@ linter:
- type_annotate_public_apis
- unawaited_futures
- unnecessary_lambdas
- unnecessary_library_directive
- unnecessary_parenthesis
- unnecessary_statements
- unreachable_from_main
- unsafe_html
- use_full_hex_values_for_flutter_colors
- use_is_even_rather_than_modulo
- use_string_buffers
- use_string_in_part_of_directives
- use_super_parameters
2 changes: 2 additions & 0 deletions checked_yaml/test/ensure_build_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

@TestOn('vm')
@Tags(['presubmit-only'])
library test;

import 'package:build_verify/build_verify.dart';
import 'package:test/test.dart';

Expand Down
2 changes: 2 additions & 0 deletions example/test/ensure_build_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.

@Tags(['presubmit-only'])
library test;

import 'package:build_verify/build_verify.dart';
import 'package:test/test.dart';

Expand Down
2 changes: 1 addition & 1 deletion json_serializable/lib/type_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

export 'src/shared_checkers.dart' show simpleJsonTypeChecker;
export 'src/type_helper.dart'
show TypeHelperContext, TypeHelperContextWithConfig, TypeHelper;
show TypeHelper, TypeHelperContext, TypeHelperContextWithConfig;
export 'src/type_helpers/big_int_helper.dart';
export 'src/type_helpers/config_types.dart';
export 'src/type_helpers/convert_helper.dart';
Expand Down
2 changes: 2 additions & 0 deletions json_serializable/test/annotation_version_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

@TestOn('vm')
@Tags(['presubmit-only'])
library test;

import 'dart:io';

import 'package:json_serializable/src/check_dependencies.dart';
Expand Down
2 changes: 2 additions & 0 deletions json_serializable/test/config_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.

@TestOn('vm')
library test;

import 'dart:io';

import 'package:build/build.dart';
Expand Down
2 changes: 2 additions & 0 deletions json_serializable/test/custom_configuration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.

@TestOn('vm')
library test;

import 'dart:async';

import 'package:analyzer/dart/element/type.dart';
Expand Down
2 changes: 1 addition & 1 deletion json_serializable/test/default_value/default_value.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import 'package:json_annotation/json_annotation.dart';
import 'default_value_interface.dart' as dvi hide Greek;
import 'default_value_interface.dart'
show
Greek,
ConstClass,
ConstClassConverter,
Greek,
constClassFromJson,
constClassToJson,
intDefaultValueFunction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import 'package:json_annotation/json_annotation.dart';
import 'default_value_interface.dart' as dvi hide Greek;
import 'default_value_interface.dart'
show
Greek,
ConstClass,
ConstClassConverter,
Greek,
constClassFromJson,
constClassToJson,
intDefaultValueFunction;
Expand Down
2 changes: 2 additions & 0 deletions json_serializable/test/ensure_build_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

@TestOn('vm')
@Tags(['presubmit-only'])
library test;

import 'package:build_verify/build_verify.dart';
import 'package:test/test.dart';

Expand Down
2 changes: 2 additions & 0 deletions json_serializable/test/enum_helper_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.

@TestOn('vm')
library test;

import 'package:json_serializable/src/type_helpers/enum_helper.dart';
import 'package:test/test.dart';

Expand Down
2 changes: 2 additions & 0 deletions json_serializable/test/json_serializable_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.

@TestOn('vm')
library test;

import 'package:json_serializable/json_serializable.dart';
import 'package:path/path.dart' as p;
import 'package:source_gen_test/source_gen_test.dart';
Expand Down
2 changes: 2 additions & 0 deletions json_serializable/test/literal/json_literal_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.

@TestOn('vm')
library test;

import 'dart:convert';
import 'dart:io';

Expand Down
1 change: 1 addition & 0 deletions json_serializable/test/supported_types/extra_map_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// ignore_for_file: prefer_const_declarations
@TestOn('vm')
library test;

import 'dart:convert';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// ignore_for_file: prefer_const_declarations
@TestOn('vm')
library test;

import 'dart:convert';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// ignore_for_file: prefer_const_declarations
@TestOn('vm')
library test;

import 'dart:convert';

Expand Down
1 change: 1 addition & 0 deletions json_serializable/test/supported_types/type_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// ignore_for_file: prefer_const_declarations
@TestOn('vm')
library test;

import 'dart:convert';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// ignore_for_file: prefer_const_declarations
@TestOn('vm')
library test;

import 'dart:convert';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// ignore_for_file: prefer_const_declarations
@TestOn('vm')
library test;

import 'dart:convert';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// ignore_for_file: prefer_const_declarations
@TestOn('vm')
library test;

import 'dart:convert';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// ignore_for_file: prefer_const_declarations
@TestOn('vm')
library test;

import 'dart:convert';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// ignore_for_file: prefer_const_declarations
@TestOn('vm')
library test;

import 'dart:convert';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// ignore_for_file: prefer_const_declarations
@TestOn('vm')
library test;

import 'dart:convert';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// ignore_for_file: prefer_const_declarations
@TestOn('vm')
library test;

import 'dart:convert';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// ignore_for_file: prefer_const_declarations
@TestOn('vm')
library test;

import 'dart:convert';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// ignore_for_file: prefer_const_declarations
@TestOn('vm')
library test;

import 'dart:convert';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// ignore_for_file: prefer_const_declarations
@TestOn('vm')
library test;

import 'dart:convert';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// ignore_for_file: prefer_const_declarations
@TestOn('vm')
library test;

import 'dart:convert';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// ignore_for_file: prefer_const_declarations
@TestOn('vm')
library test;

import 'dart:convert';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// ignore_for_file: prefer_const_declarations
@TestOn('vm')
library test;

import 'dart:convert';

Expand Down

0 comments on commit 217f21e

Please sign in to comment.