Skip to content

Commit b4b07bb

Browse files
authored
Fix CI, update lints (dart-archive/term_glyph#34)
1 parent d73ff18 commit b4b07bb

File tree

7 files changed

+42
-83
lines changed

7 files changed

+42
-83
lines changed

pkgs/term_glyph/.github/workflows/test-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
matrix:
4848
# Add macos-latest and/or windows-latest if relevant for this package.
4949
os: [ubuntu-latest]
50-
sdk: [2.12.0, dev]
50+
sdk: [2.17.0, dev]
5151
steps:
5252
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
5353
- uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46

pkgs/term_glyph/CHANGELOG.md

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.2.2-dev
2+
3+
* Require Dart 2.17
4+
15
## 1.2.1
26

37
* Migrate to `package:lints`.
@@ -6,24 +10,9 @@
610
## 1.2.0
711

812
* Stable release for null safety.
9-
10-
## 1.2.0-nullsafety.3
11-
1213
* Update SDK constraints to `>=2.12.0-0 <3.0.0` based on beta release
1314
guidelines.
1415

15-
## 1.2.0-nullsafety.2
16-
17-
* Allow prerelease versions of the 2.12 sdk.
18-
19-
## 1.2.0-nullsafety.1
20-
21-
* Allow 2.10 stable and 2.11.0 dev SDK versions.
22-
23-
## 1.2.0-nullsafety
24-
25-
* Update to null safety. All apis require non-nullable types.
26-
2716
## 1.1.0
2817

2918
* Add a `GlyphSet` class that can be used to easily choose which set of glyphs

pkgs/term_glyph/analysis_options.yaml

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,37 @@
1-
include: package:lints/recommended.yaml
1+
include: package:dart_flutter_team_lints/analysis_options.yaml
22

33
analyzer:
44
language:
55
strict-casts: true
6+
strict-inference: true
7+
strict-raw-types: true
68

79
linter:
810
rules:
911
- avoid_bool_literals_in_conditional_expressions
10-
- avoid_catching_errors
1112
- avoid_classes_with_only_static_members
12-
- avoid_function_literals_in_foreach_calls
1313
- avoid_private_typedef_functions
1414
- avoid_redundant_argument_values
15-
- avoid_renaming_method_parameters
1615
- avoid_returning_null
1716
- avoid_returning_null_for_future
18-
- avoid_returning_null_for_void
1917
- avoid_returning_this
20-
- avoid_single_cascade_in_expression_statements
2118
- avoid_unused_constructor_parameters
2219
- avoid_void_async
23-
- await_only_futures
24-
- camel_case_types
2520
- cancel_subscriptions
2621
#- cascade_invocations
2722
- comment_references
28-
- constant_identifier_names
29-
- control_flow_in_finally
30-
- directives_ordering
31-
- empty_statements
32-
- file_names
33-
- hash_and_equals
34-
- implementation_imports
35-
- iterable_contains_unrelated_type
3623
- join_return_with_assignment
3724
#- lines_longer_than_80_chars
38-
- list_remove_unrelated_type
3925
- literal_only_boolean_expressions
4026
- missing_whitespace_between_adjacent_strings
4127
- no_adjacent_strings_in_list
4228
- no_runtimeType_toString
43-
- non_constant_identifier_names
44-
- only_throw_errors
45-
- overridden_fields
4629
- package_api_docs
47-
- package_names
48-
- package_prefixed_library_names
49-
- prefer_asserts_in_initializer_lists
5030
- prefer_const_constructors
5131
- prefer_const_declarations
5232
- prefer_expression_function_bodies
5333
- prefer_final_locals
54-
- prefer_function_declarations_over_variables
55-
- prefer_initializing_formals
56-
- prefer_inlined_adds
57-
- prefer_interpolation_to_compose_strings
58-
- prefer_is_not_operator
59-
- prefer_null_aware_operators
6034
- prefer_relative_imports
61-
- prefer_typing_uninitialized_variables
62-
- prefer_void_to_null
63-
- provide_deprecation_message
64-
- sort_pub_dependencies
6535
- test_types_in_equals
66-
- throw_in_finally
6736
- unnecessary_await_in_return
68-
- unnecessary_brace_in_string_interps
69-
- unnecessary_getters_setters
70-
- unnecessary_lambdas
71-
- unnecessary_null_aware_assignments
72-
- unnecessary_overrides
73-
- unnecessary_parenthesis
74-
- unnecessary_statements
75-
- unnecessary_string_interpolations
7637
- use_string_buffers
77-
- void_checks

pkgs/term_glyph/lib/src/generated/glyph_set.dart

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ abstract class GlyphSet {
3737

3838
/// A left-pointing arrow.
3939
///
40-
/// Note that the Unicode arrow glyphs may overlap with adjacent characters in some
41-
/// terminal fonts, and should generally be surrounding by spaces.
40+
/// Note that the Unicode arrow glyphs may overlap with adjacent characters in
41+
/// some terminal fonts, and should generally be surrounding by spaces.
4242
String get leftArrow;
4343

4444
/// A right-pointing arrow.
4545
///
46-
/// Note that the Unicode arrow glyphs may overlap with adjacent characters in some
47-
/// terminal fonts, and should generally be surrounding by spaces.
46+
/// Note that the Unicode arrow glyphs may overlap with adjacent characters in
47+
/// some terminal fonts, and should generally be surrounding by spaces.
4848
String get rightArrow;
4949

5050
/// An upwards-pointing arrow.
@@ -128,13 +128,16 @@ abstract class GlyphSet {
128128
/// A bold horizontal box line with a vertical line going up from the middle.
129129
String get teeUpBold;
130130

131-
/// A bold horizontal box line with a vertical line going down from the middle.
131+
/// A bold horizontal box line with a vertical line going down from the
132+
/// middle.
132133
String get teeDownBold;
133134

134-
/// A bold vertical box line with a horizontal line going left from the middle.
135+
/// A bold vertical box line with a horizontal line going left from the
136+
/// middle.
135137
String get teeLeftBold;
136138

137-
/// A bold vertical box line with a horizontal line going right from the middle.
139+
/// A bold vertical box line with a horizontal line going right from the
140+
/// middle.
138141
String get teeRightBold;
139142

140143
/// The top half of a bold vertical box line.
@@ -170,16 +173,20 @@ abstract class GlyphSet {
170173
/// An intersection of double vertical and horizontal box lines.
171174
String get crossDouble;
172175

173-
/// A double horizontal box line with a vertical line going up from the middle.
176+
/// A double horizontal box line with a vertical line going up from the
177+
/// middle.
174178
String get teeUpDouble;
175179

176-
/// A double horizontal box line with a vertical line going down from the middle.
180+
/// A double horizontal box line with a vertical line going down from the
181+
/// middle.
177182
String get teeDownDouble;
178183

179-
/// A double vertical box line with a horizontal line going left from the middle.
184+
/// A double vertical box line with a horizontal line going left from the
185+
/// middle.
180186
String get teeLeftDouble;
181187

182-
/// A double vertical box line with a horizontal line going right from the middle.
188+
/// A double vertical box line with a horizontal line going right from the
189+
/// middle.
183190
String get teeRightDouble;
184191

185192
/// A dashed horizontal line that can be used to draw a box.

pkgs/term_glyph/lib/src/generated/top_level.dart

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ String get bullet => glyph.glyphs.bullet;
1414

1515
/// A left-pointing arrow.
1616
///
17-
/// Note that the Unicode arrow glyphs may overlap with adjacent characters in some
18-
/// terminal fonts, and should generally be surrounding by spaces.
17+
/// Note that the Unicode arrow glyphs may overlap with adjacent characters in
18+
/// some terminal fonts, and should generally be surrounding by spaces.
1919
///
2020
/// If [glyph.ascii] is `false`, this is "←". If it's `true`, this is
2121
/// "<" instead.
2222
String get leftArrow => glyph.glyphs.leftArrow;
2323

2424
/// A right-pointing arrow.
2525
///
26-
/// Note that the Unicode arrow glyphs may overlap with adjacent characters in some
27-
/// terminal fonts, and should generally be surrounding by spaces.
26+
/// Note that the Unicode arrow glyphs may overlap with adjacent characters in
27+
/// some terminal fonts, and should generally be surrounding by spaces.
2828
///
2929
/// If [glyph.ascii] is `false`, this is "→". If it's `true`, this is
3030
/// ">" instead.
@@ -282,19 +282,22 @@ String get crossDouble => glyph.glyphs.crossDouble;
282282
/// "+" instead.
283283
String get teeUpDouble => glyph.glyphs.teeUpDouble;
284284

285-
/// A double horizontal box line with a vertical line going down from the middle.
285+
/// A double horizontal box line with a vertical line going down from the
286+
/// middle.
286287
///
287288
/// If [glyph.ascii] is `false`, this is "╦". If it's `true`, this is
288289
/// "+" instead.
289290
String get teeDownDouble => glyph.glyphs.teeDownDouble;
290291

291-
/// A double vertical box line with a horizontal line going left from the middle.
292+
/// A double vertical box line with a horizontal line going left from the
293+
/// middle.
292294
///
293295
/// If [glyph.ascii] is `false`, this is "╣". If it's `true`, this is
294296
/// "+" instead.
295297
String get teeLeftDouble => glyph.glyphs.teeLeftDouble;
296298

297-
/// A double vertical box line with a horizontal line going right from the middle.
299+
/// A double vertical box line with a horizontal line going right from the
300+
/// middle.
298301
///
299302
/// If [glyph.ascii] is `false`, this is "╠". If it's `true`, this is
300303
/// "+" instead.

pkgs/term_glyph/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: term_glyph
2-
version: 1.2.1
2+
version: 1.2.2-dev
33
description: Useful Unicode glyphs and ASCII substitutes.
44
repository: https://github.com/dart-lang/term_glyph
55

66
environment:
7-
sdk: ">=2.12.0 <3.0.0"
7+
sdk: ">=2.17.0 <3.0.0"
88

99
dev_dependencies:
1010
csv: ^5.0.0
11+
dart_flutter_team_lints: ^0.1.0
1112
dart_style: ^2.0.0
12-
lints: ^1.0.0
1313
test: ^1.16.0

pkgs/term_glyph/tool/generate.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void main() {
2727
}
2828

2929
/// Writes `lib/src/generated/glyph_set.dart`.
30-
void _writeGlyphSetInterface(List<List> data) {
30+
void _writeGlyphSetInterface(List<List<dynamic>> data) {
3131
final file =
3232
File('lib/src/generated/glyph_set.dart').openSync(mode: FileMode.write);
3333
file.writeStringSync(r'''
@@ -82,7 +82,7 @@ void _writeGlyphSetInterface(List<List> data) {
8282
///
8383
/// If [ascii] is `true`, this writes the ASCII glyph set. Otherwise it writes
8484
/// the Unicode glyph set.
85-
void _writeGlyphSet(List<List> data, {required bool ascii}) {
85+
void _writeGlyphSet(List<List<dynamic>> data, {required bool ascii}) {
8686
final file =
8787
File('lib/src/generated/${ascii ? "ascii" : "unicode"}_glyph_set.dart')
8888
.openSync(mode: FileMode.write);
@@ -120,7 +120,7 @@ void _writeGlyphSet(List<List> data, {required bool ascii}) {
120120
}
121121

122122
/// Writes `lib/src/generated/top_level.dart`.
123-
void _writeTopLevel(List<List> data) {
123+
void _writeTopLevel(List<List<dynamic>> data) {
124124
final file =
125125
File('lib/src/generated/top_level.dart').openSync(mode: FileMode.write);
126126

0 commit comments

Comments
 (0)