Fix CI, update lints (dart-lang/term_glyph#34)
diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml
index b552d6a..58201d8 100644
--- a/pkgs/term_glyph/.github/workflows/test-package.yml
+++ b/pkgs/term_glyph/.github/workflows/test-package.yml
@@ -47,7 +47,7 @@
matrix:
# Add macos-latest and/or windows-latest if relevant for this package.
os: [ubuntu-latest]
- sdk: [2.12.0, dev]
+ sdk: [2.17.0, dev]
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
diff --git a/pkgs/term_glyph/CHANGELOG.md b/pkgs/term_glyph/CHANGELOG.md
index 4f90376..1cf47ac 100644
--- a/pkgs/term_glyph/CHANGELOG.md
+++ b/pkgs/term_glyph/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 1.2.2-dev
+
+* Require Dart 2.17
+
## 1.2.1
* Migrate to `package:lints`.
@@ -6,24 +10,9 @@
## 1.2.0
* Stable release for null safety.
-
-## 1.2.0-nullsafety.3
-
* Update SDK constraints to `>=2.12.0-0 <3.0.0` based on beta release
guidelines.
-## 1.2.0-nullsafety.2
-
-* Allow prerelease versions of the 2.12 sdk.
-
-## 1.2.0-nullsafety.1
-
-* Allow 2.10 stable and 2.11.0 dev SDK versions.
-
-## 1.2.0-nullsafety
-
-* Update to null safety. All apis require non-nullable types.
-
## 1.1.0
* Add a `GlyphSet` class that can be used to easily choose which set of glyphs
diff --git a/pkgs/term_glyph/analysis_options.yaml b/pkgs/term_glyph/analysis_options.yaml
index 52624aa..a4cc659 100644
--- a/pkgs/term_glyph/analysis_options.yaml
+++ b/pkgs/term_glyph/analysis_options.yaml
@@ -1,77 +1,37 @@
-include: package:lints/recommended.yaml
+include: package:dart_flutter_team_lints/analysis_options.yaml
analyzer:
language:
strict-casts: true
+ strict-inference: true
+ strict-raw-types: true
linter:
rules:
- avoid_bool_literals_in_conditional_expressions
- - avoid_catching_errors
- avoid_classes_with_only_static_members
- - avoid_function_literals_in_foreach_calls
- avoid_private_typedef_functions
- avoid_redundant_argument_values
- - avoid_renaming_method_parameters
- avoid_returning_null
- avoid_returning_null_for_future
- - avoid_returning_null_for_void
- avoid_returning_this
- - avoid_single_cascade_in_expression_statements
- avoid_unused_constructor_parameters
- avoid_void_async
- - await_only_futures
- - camel_case_types
- cancel_subscriptions
#- cascade_invocations
- comment_references
- - constant_identifier_names
- - control_flow_in_finally
- - directives_ordering
- - empty_statements
- - file_names
- - hash_and_equals
- - implementation_imports
- - iterable_contains_unrelated_type
- join_return_with_assignment
#- lines_longer_than_80_chars
- - list_remove_unrelated_type
- literal_only_boolean_expressions
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
- no_runtimeType_toString
- - non_constant_identifier_names
- - only_throw_errors
- - overridden_fields
- package_api_docs
- - package_names
- - package_prefixed_library_names
- - prefer_asserts_in_initializer_lists
- prefer_const_constructors
- prefer_const_declarations
- prefer_expression_function_bodies
- prefer_final_locals
- - prefer_function_declarations_over_variables
- - prefer_initializing_formals
- - prefer_inlined_adds
- - prefer_interpolation_to_compose_strings
- - prefer_is_not_operator
- - prefer_null_aware_operators
- prefer_relative_imports
- - prefer_typing_uninitialized_variables
- - prefer_void_to_null
- - provide_deprecation_message
- - sort_pub_dependencies
- test_types_in_equals
- - throw_in_finally
- unnecessary_await_in_return
- - unnecessary_brace_in_string_interps
- - unnecessary_getters_setters
- - unnecessary_lambdas
- - unnecessary_null_aware_assignments
- - unnecessary_overrides
- - unnecessary_parenthesis
- - unnecessary_statements
- - unnecessary_string_interpolations
- use_string_buffers
- - void_checks
diff --git a/pkgs/term_glyph/lib/src/generated/glyph_set.dart b/pkgs/term_glyph/lib/src/generated/glyph_set.dart
index 10713b2..be1a668 100644
--- a/pkgs/term_glyph/lib/src/generated/glyph_set.dart
+++ b/pkgs/term_glyph/lib/src/generated/glyph_set.dart
@@ -37,14 +37,14 @@
/// A left-pointing arrow.
///
- /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some
- /// terminal fonts, and should generally be surrounding by spaces.
+ /// Note that the Unicode arrow glyphs may overlap with adjacent characters in
+ /// some terminal fonts, and should generally be surrounding by spaces.
String get leftArrow;
/// A right-pointing arrow.
///
- /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some
- /// terminal fonts, and should generally be surrounding by spaces.
+ /// Note that the Unicode arrow glyphs may overlap with adjacent characters in
+ /// some terminal fonts, and should generally be surrounding by spaces.
String get rightArrow;
/// An upwards-pointing arrow.
@@ -128,13 +128,16 @@
/// A bold horizontal box line with a vertical line going up from the middle.
String get teeUpBold;
- /// A bold horizontal box line with a vertical line going down from the middle.
+ /// A bold horizontal box line with a vertical line going down from the
+ /// middle.
String get teeDownBold;
- /// A bold vertical box line with a horizontal line going left from the middle.
+ /// A bold vertical box line with a horizontal line going left from the
+ /// middle.
String get teeLeftBold;
- /// A bold vertical box line with a horizontal line going right from the middle.
+ /// A bold vertical box line with a horizontal line going right from the
+ /// middle.
String get teeRightBold;
/// The top half of a bold vertical box line.
@@ -170,16 +173,20 @@
/// An intersection of double vertical and horizontal box lines.
String get crossDouble;
- /// A double horizontal box line with a vertical line going up from the middle.
+ /// A double horizontal box line with a vertical line going up from the
+ /// middle.
String get teeUpDouble;
- /// A double horizontal box line with a vertical line going down from the middle.
+ /// A double horizontal box line with a vertical line going down from the
+ /// middle.
String get teeDownDouble;
- /// A double vertical box line with a horizontal line going left from the middle.
+ /// A double vertical box line with a horizontal line going left from the
+ /// middle.
String get teeLeftDouble;
- /// A double vertical box line with a horizontal line going right from the middle.
+ /// A double vertical box line with a horizontal line going right from the
+ /// middle.
String get teeRightDouble;
/// A dashed horizontal line that can be used to draw a box.
diff --git a/pkgs/term_glyph/lib/src/generated/top_level.dart b/pkgs/term_glyph/lib/src/generated/top_level.dart
index c430b33..925903e 100644
--- a/pkgs/term_glyph/lib/src/generated/top_level.dart
+++ b/pkgs/term_glyph/lib/src/generated/top_level.dart
@@ -14,8 +14,8 @@
/// A left-pointing arrow.
///
-/// Note that the Unicode arrow glyphs may overlap with adjacent characters in some
-/// terminal fonts, and should generally be surrounding by spaces.
+/// Note that the Unicode arrow glyphs may overlap with adjacent characters in
+/// some terminal fonts, and should generally be surrounding by spaces.
///
/// If [glyph.ascii] is `false`, this is "←". If it's `true`, this is
/// "<" instead.
@@ -23,8 +23,8 @@
/// A right-pointing arrow.
///
-/// Note that the Unicode arrow glyphs may overlap with adjacent characters in some
-/// terminal fonts, and should generally be surrounding by spaces.
+/// Note that the Unicode arrow glyphs may overlap with adjacent characters in
+/// some terminal fonts, and should generally be surrounding by spaces.
///
/// If [glyph.ascii] is `false`, this is "→". If it's `true`, this is
/// ">" instead.
@@ -282,19 +282,22 @@
/// "+" instead.
String get teeUpDouble => glyph.glyphs.teeUpDouble;
-/// A double horizontal box line with a vertical line going down from the middle.
+/// A double horizontal box line with a vertical line going down from the
+/// middle.
///
/// If [glyph.ascii] is `false`, this is "╦". If it's `true`, this is
/// "+" instead.
String get teeDownDouble => glyph.glyphs.teeDownDouble;
-/// A double vertical box line with a horizontal line going left from the middle.
+/// A double vertical box line with a horizontal line going left from the
+/// middle.
///
/// If [glyph.ascii] is `false`, this is "╣". If it's `true`, this is
/// "+" instead.
String get teeLeftDouble => glyph.glyphs.teeLeftDouble;
-/// A double vertical box line with a horizontal line going right from the middle.
+/// A double vertical box line with a horizontal line going right from the
+/// middle.
///
/// If [glyph.ascii] is `false`, this is "╠". If it's `true`, this is
/// "+" instead.
diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml
index 7019e2d..6c6a5f1 100644
--- a/pkgs/term_glyph/pubspec.yaml
+++ b/pkgs/term_glyph/pubspec.yaml
@@ -1,13 +1,13 @@
name: term_glyph
-version: 1.2.1
+version: 1.2.2-dev
description: Useful Unicode glyphs and ASCII substitutes.
repository: https://github.com/dart-lang/term_glyph
environment:
- sdk: ">=2.12.0 <3.0.0"
+ sdk: ">=2.17.0 <3.0.0"
dev_dependencies:
csv: ^5.0.0
+ dart_flutter_team_lints: ^0.1.0
dart_style: ^2.0.0
- lints: ^1.0.0
test: ^1.16.0
diff --git a/pkgs/term_glyph/tool/generate.dart b/pkgs/term_glyph/tool/generate.dart
index 007913b..f5cdade 100644
--- a/pkgs/term_glyph/tool/generate.dart
+++ b/pkgs/term_glyph/tool/generate.dart
@@ -27,7 +27,7 @@
}
/// Writes `lib/src/generated/glyph_set.dart`.
-void _writeGlyphSetInterface(List<List> data) {
+void _writeGlyphSetInterface(List<List<dynamic>> data) {
final file =
File('lib/src/generated/glyph_set.dart').openSync(mode: FileMode.write);
file.writeStringSync(r'''
@@ -82,7 +82,7 @@
///
/// If [ascii] is `true`, this writes the ASCII glyph set. Otherwise it writes
/// the Unicode glyph set.
-void _writeGlyphSet(List<List> data, {required bool ascii}) {
+void _writeGlyphSet(List<List<dynamic>> data, {required bool ascii}) {
final file =
File('lib/src/generated/${ascii ? "ascii" : "unicode"}_glyph_set.dart')
.openSync(mode: FileMode.write);
@@ -120,7 +120,7 @@
}
/// Writes `lib/src/generated/top_level.dart`.
-void _writeTopLevel(List<List> data) {
+void _writeTopLevel(List<List<dynamic>> data) {
final file =
File('lib/src/generated/top_level.dart').openSync(mode: FileMode.write);