Skip to content
This repository was archived by the owner on Oct 17, 2024. It is now read-only.

Commit e43448d

Browse files
committed
Update to latest lints and fix
1 parent 3279f5d commit e43448d

File tree

7 files changed

+15
-31
lines changed

7 files changed

+15
-31
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.1.1-wip
2+
3+
* Require Dart `^3.1.0`
4+
15
## 1.1.0
26

37
* Add `tryParseRadix`, `tryParseInt` and `tryParseHex` static methods

analysis_options.yaml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,22 @@
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
66

77
linter:
88
rules:
9-
- avoid_catching_errors
10-
- avoid_dynamic_calls
119
- avoid_private_typedef_functions
1210
- avoid_returning_null
1311
- avoid_unused_constructor_parameters
1412
- cancel_subscriptions
1513
- cascade_invocations
16-
- comment_references
17-
- directives_ordering
1814
- join_return_with_assignment
19-
- lines_longer_than_80_chars
2015
- missing_whitespace_between_adjacent_strings
2116
- no_adjacent_strings_in_list
2217
- no_runtimeType_toString
23-
- only_throw_errors
2418
- package_api_docs
25-
- prefer_asserts_in_initializer_lists
26-
- prefer_const_constructors
2719
- prefer_const_declarations
2820
- prefer_expression_function_bodies
29-
- prefer_interpolation_to_compose_strings
30-
- prefer_relative_imports
31-
- sort_pub_dependencies
32-
- test_types_in_equals
33-
- throw_in_finally
34-
- type_annotate_public_apis
35-
- unnecessary_lambdas
36-
- unnecessary_null_aware_assignments
37-
- unnecessary_parenthesis
3821
- unnecessary_raw_strings
39-
- unnecessary_statements
40-
- use_is_even_rather_than_modulo
4122
- use_string_buffers

lib/src/int64.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ class Int64 implements IntX {
267267

268268
// Returns the [Int64] representation of the specified value. Throws
269269
// [ArgumentError] for non-integer arguments.
270-
static Int64 _promote(value) {
270+
static Int64 _promote(Object value) {
271271
if (value is Int64) {
272272
return value;
273273
} else if (value is int) {
@@ -968,7 +968,7 @@ class Int64 implements IntX {
968968

969969
// Implementation of '~/', '%' and 'remainder'.
970970

971-
static Int64 _divide(Int64 a, other, int what) {
971+
static Int64 _divide(Int64 a, Object other, int what) {
972972
Int64 b = _promote(other);
973973
if (b.isZero) {
974974
throw UnsupportedError('Division by zero');

lib/src/utilities.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ int validateRadix(int radix) =>
1616
/// not a valid digit in any radix in the range 2 through 36.
1717
int decodeDigit(int c) {
1818
// Hex digit char codes
19-
const int c0 = 48; // '0'.codeUnitAt(0)
20-
const int ca = 97; // 'a'.codeUnitAt(0)
19+
const c0 = 48; // '0'.codeUnitAt(0)
20+
const ca = 97; // 'a'.codeUnitAt(0)
2121

22-
int digit = c ^ c0;
22+
var digit = c ^ c0;
2323
if (digit < 10) return digit;
24-
int letter = (c | 0x20) - ca;
24+
var letter = (c | 0x20) - ca;
2525
if (letter >= 0) {
2626
// Returns values above 36 for invalid digits.
2727
// The value is checked against the actual radix where the return

pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: fixnum
2-
version: 1.1.0
2+
version: 1.1.1-wip
33
description: >-
44
Library for 32- and 64-bit signed fixed-width integers with consistent
55
behavior between native and JS runtimes.
66
repository: https://github.com/dart-lang/fixnum
77

88
environment:
9-
sdk: '>=2.19.0 <3.0.0'
9+
sdk: ^3.1.0
1010

1111
dev_dependencies:
12-
lints: ^2.0.0
12+
dart_flutter_team_lints: ^2.0.0
1313
test: ^1.16.0

test/int64_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//
88
// ignore_for_file: omit_local_variable_types
99

10-
library int64test;
11-
1210
import 'package:fixnum/fixnum.dart';
1311
import 'package:test/test.dart';
1412

test/int_64_vm_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
@TestOn('vm')
6+
library;
67

78
import 'package:fixnum/fixnum.dart';
89
import 'package:test/test.dart';

0 commit comments

Comments
 (0)