Skip to content

Commit 2ea7a5e

Browse files
authored
Enable and fix lint non_constant_identifier_names (#311)
1 parent 8342cf0 commit 2ea7a5e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ linter:
3636
- list_remove_unrelated_type
3737
- no_adjacent_strings_in_list
3838
- no_duplicate_case_values
39-
# non_constant_identifier_names
39+
- non_constant_identifier_names
4040
- null_closures
4141
- omit_local_variable_types
4242
- only_throw_errors

lib/src/utils.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ Encoding requiredEncodingForCharset(String charset) =>
5555

5656
/// A regular expression that matches strings that are composed entirely of
5757
/// ASCII-compatible characters.
58-
final RegExp _ASCII_ONLY = RegExp(r'^[\x00-\x7F]+$');
58+
final _asciiOnly = RegExp(r'^[\x00-\x7F]+$');
5959

6060
/// Returns whether [string] is composed entirely of ASCII-compatible
6161
/// characters.
62-
bool isPlainAscii(String string) => _ASCII_ONLY.hasMatch(string);
62+
bool isPlainAscii(String string) => _asciiOnly.hasMatch(string);
6363

6464
/// Converts [input] into a [Uint8List].
6565
///

0 commit comments

Comments
 (0)