-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
dart-archive/linter
#3022Closed
Copy link
Labels
devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.linter-false-positiveIssues related to lint rules that report a problem when it isn't a problem.Issues related to lint rules that report a problem when it isn't a problem.
Description
I think the following while (true) shouldn't be flagged by literal_only_boolean_expressions :
/// Return an unused TCP port number.
Future<int> findAvailablePort() async {
int port = 20000;
while (true) { // LINT
try {
ServerSocket socket =
await ServerSocket.bind(InternetAddress.LOOPBACK_IP_V4, port);
await socket.close();
return port;
} catch (_) {
port++;
}
}
}jamesderlin, sensuikan1973, srawlins and Quijx
Metadata
Metadata
Assignees
Labels
devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.linter-false-positiveIssues related to lint rules that report a problem when it isn't a problem.Issues related to lint rules that report a problem when it isn't a problem.