Skip to content

Commit 4e5d0f4

Browse files
committed
preparing the package
1 parent 5fc1947 commit 4e5d0f4

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

analysis_options.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Defines a default set of lint rules enforced for
2-
# projects at Google. For details and rationale,
3-
# see https://github.com/dart-lang/pedantic#enabled-lints.
1+
# default set of lint rules enforced for projects at Google
2+
# https://github.com/dart-lang/pedantic#enabled-lints
43
include: package:pedantic/analysis_options.yaml
54

6-
# For lint rules and documentation, see http://dart-lang.github.io/linter/lints.
7-
# Uncomment to specify additional rules.
8-
# linter:
9-
# rules:
10-
# - camel_case_types
5+
# http://dart-lang.github.io/linter/lints
6+
linter:
7+
rules:
8+
omit_local_variable_types: false
9+
await_only_futures: true
1110

1211
analyzer:
1312
# exclude:
1413
# - path/to/excluded/files/**
14+

lib/src/00_ints.dart

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ extension BitInt on int {
3434
// uint64 will shift all 64 of its bits,
3535
// but int64 will shift lower 63 and preserve the highest bit
3636

37-
if (this >= 0)
37+
if (this >= 0) {
3838
return this >> shift;
39+
}
3940
else {
40-
int x = this;
41+
var x = this;
4142
// setting highest bit to zero
4243
x &= INT64_MAX_POSITIVE;
4344
assert(x >= 0);
@@ -59,10 +60,11 @@ extension BitInt on int {
5960
// uint64 will shift all 64 of its bits,
6061
// but int64 will shift lower 63 and preserve the highest bit
6162

62-
if (this >= 0)
63+
if (this >= 0) {
6364
return this >> shift;
65+
}
6466
else {
65-
int x = this;
67+
var x = this;
6668
// setting highest bit to zero
6769
x &= INT64_MAX_POSITIVE;
6870
assert(x >= 0);
@@ -93,8 +95,9 @@ extension BitInt on int {
9395

9496
String toHexUint64() {
9597

96-
if (this>=0)
98+
if (this>=0) {
9799
return this.toRadixString(16).toUpperCase().padLeft(16, '0');
100+
}
98101

99102
int lower7bytes = this & INT64_LOWER_7_BYTES;
100103
String strLow = lower7bytes.toRadixString(16).toUpperCase().padLeft(14, '0');

0 commit comments

Comments
 (0)