Skip to content

Commit 9085e6b

Browse files
authored
Enable standard lints, run travis on oldest supported SDK (flutter#10)
1 parent be6cc52 commit 9085e6b

File tree

4 files changed

+57
-30
lines changed

4 files changed

+57
-30
lines changed

.travis.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
language: dart
22

33
dart:
4-
- stable
4+
- 2.0.0
55
- dev
66

77
dart_task:
8-
- dart_analyzer: --fatal-warnings .
9-
- dartfmt
8+
- dart_analyzer: --fatal-warnings --fatal-infos .
9+
10+
matrix:
11+
include:
12+
# Only validate formatting using the dev release
13+
- dart: dev
14+
dart_task: dartfmt
1015

1116
# Only building master means that we don't run two builds for each pull request.
1217
branches:

analysis_options.yaml

Lines changed: 41 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,43 @@
1+
include: package:pedantic/analysis_options.yaml
2+
analyzer:
3+
strong-mode:
4+
implicit-casts: false
15
linter:
26
rules:
3-
# Errors
4-
- avoid_empty_else
5-
- comment_references
6-
- control_flow_in_finally
7-
- empty_statements
8-
- hash_and_equals
9-
- test_types_in_equals
10-
- throw_in_finally
11-
- unrelated_type_equality_checks
12-
- valid_regexps
13-
14-
# Style
15-
- annotate_overrides
16-
- avoid_init_to_null
17-
- avoid_return_types_on_setters
18-
- await_only_futures
19-
- camel_case_types
20-
- empty_catches
21-
- empty_constructor_bodies
22-
- library_names
23-
- library_prefixes
24-
- non_constant_identifier_names
25-
- prefer_is_not_empty
26-
- slash_for_doc_comments
27-
- type_init_formals
7+
- avoid_empty_else
8+
- avoid_init_to_null
9+
- avoid_null_checks_in_equality_operators
10+
- avoid_unused_constructor_parameters
11+
- await_only_futures
12+
- camel_case_types
13+
- cancel_subscriptions
14+
- constant_identifier_names
15+
- control_flow_in_finally
16+
- directives_ordering
17+
- empty_catches
18+
- empty_constructor_bodies
19+
- empty_statements
20+
- hash_and_equals
21+
- implementation_imports
22+
- iterable_contains_unrelated_type
23+
- library_names
24+
- library_prefixes
25+
- list_remove_unrelated_type
26+
- non_constant_identifier_names
27+
- overridden_fields
28+
- package_api_docs
29+
- package_names
30+
- package_prefixed_library_names
31+
- prefer_equal_for_default_values
32+
- prefer_final_fields
33+
- prefer_generic_function_type_aliases
34+
- prefer_is_not_empty
35+
- slash_for_doc_comments
36+
- test_types_in_equals
37+
- throw_in_finally
38+
- type_init_formals
39+
- unnecessary_brace_in_string_interps
40+
- unnecessary_const
41+
- unnecessary_new
42+
- unrelated_type_equality_checks
43+
- valid_regexps

lib/ascii.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// ignore_for_file: constant_identifier_names
6+
57
/// Declare integer constants for each ASCII character.
68
///
79
/// The constants all start with "$" to avoid conflicting with other constants.

pubspec.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
name: charcode
2-
version: 1.1.2
2+
version: 1.1.3-dev
33
author: Dart Team <[email protected]>
44
description: >-
55
Constants for ASCII and common non-ASCII character codes.
66
When working with characters in Dart, there is no simple way to
77
represent the code point of a character.
88
This library declares readable symbolic names for character codes.
99
homepage: https://github.com/dart-lang/charcode
10+
1011
environment:
11-
sdk: '>=1.0.0 <3.0.0'
12+
sdk: '>=2.0.0 <3.0.0'
13+
14+
dev_dependencies:
15+
pedantic: ^1.0.0

0 commit comments

Comments
 (0)