Skip to content

Commit 71ccc95

Browse files
committed
Fix lint warnings.
1 parent 6ba2468 commit 71ccc95

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

lib/src/auth/sasl_authenticator.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,17 @@ class PostgresSaslAuthenticator extends PostgresAuthenticator {
2323
case AuthenticationMessage.KindSASL:
2424
final bytesToSend = authenticator.handleMessage(
2525
SaslMessageType.AuthenticationSASL, message.bytes);
26-
if (bytesToSend == null)
26+
if (bytesToSend == null) {
2727
throw PostgreSQLException('KindSASL: No bytes to send');
28+
}
2829
msg = SaslClientFirstMessage(bytesToSend, authenticator.mechanism.name);
2930
break;
3031
case AuthenticationMessage.KindSASLContinue:
3132
final bytesToSend = authenticator.handleMessage(
3233
SaslMessageType.AuthenticationSASLContinue, message.bytes);
33-
if (bytesToSend == null)
34+
if (bytesToSend == null) {
3435
throw PostgreSQLException('KindSASLContinue: No bytes to send');
36+
}
3537
msg = SaslClientLastMessage(bytesToSend);
3638
break;
3739
case AuthenticationMessage.KindSASLFinal:

lib/src/binary_codec.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ class PostgresBinaryEncoder extends Converter<dynamic, Uint8List?> {
331331
}
332332
if (!_numericRegExp.hasMatch(value)) {
333333
throw FormatException(
334-
'Invalid format for parameter value. Expected: String which matches "/^(\\d*)(\\.\\d*)?\$/" Got: ${value}');
334+
'Invalid format for parameter value. Expected: String which matches "/^(\\d*)(\\.\\d*)?\$/" Got: $value');
335335
}
336336
final parts = value.split('.');
337337

@@ -603,8 +603,9 @@ class PostgresBinaryDecoder extends Converter<Uint8List, dynamic> {
603603
}
604604

605605
var result = '$sign${intPart.replaceAll(_leadingZerosRegExp, '')}';
606-
if (result.isEmpty)
606+
if (result.isEmpty) {
607607
result = '0'; // Show at least 0, if no int value is given.
608+
}
608609
if (dScale > 0) {
609610
// Only add fractional digits, if dScale allows
610611
result += '.${fractPart.padRight(dScale, '0').substring(0, dScale)}';

0 commit comments

Comments
 (0)