We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6807503 commit 73a945eCopy full SHA for 73a945e
1 file changed
bin/audit/key_parser.dart
@@ -91,7 +91,12 @@ class KeyParser {
91
final content = file.readAsStringSync();
92
93
// remove all comments to avoid false positives
94
- final commentPattern = RegExp(r'\/\/.*?$|\/\*.*?\*/', multiLine: true, dotAll: true);
+ // remove single-line comments that start the line (optionally preceded by whitespace)
95
+ // and multi-line /* ... */ blocks
96
+ final commentPattern = RegExp(
97
+ r'^[ \t]*//.*?$|/\*[\s\S]*?\*/',
98
+ multiLine: true,
99
+ );
100
final commentRemovedContent = content.replaceAll(commentPattern, '');
101
102
for (var patternType in KeyPatternType.values) {
0 commit comments