Skip to content

Commit

Permalink
Update lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Satvik Pendem authored and Satvik Pendem committed Jan 16, 2025
1 parent 6efc747 commit 1d81cc4
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,12 @@ class _Duplicator {
final fileName = path.basename(file.path);
final fileStem = path.basenameWithoutExtension(file.path);
if (file is! File ||
path.extension(file.path) != '.${generator.extension}') continue;
if (generator.duplicatorBlacklistNames.contains(fileName)) continue;
path.extension(file.path) != '.${generator.extension}') {
continue;
}
if (generator.duplicatorBlacklistNames.contains(fileName)) {
continue;
}
if (DuplicatorMode.allValues
.any((mode) => fileStem.contains(mode.postfix))) {
continue;
Expand All @@ -113,7 +117,9 @@ class _Duplicator {
final chosenModes = _computeModes(annotation);

for (final mode in chosenModes) {
if (annotation.forbiddenDuplicatorModes.contains(mode)) continue;
if (annotation.forbiddenDuplicatorModes.contains(mode)) {
continue;
}

var outputText = computeDuplicatorPrelude(' from `$fileName`') +
(annotation.addCode ?? '') +
Expand Down Expand Up @@ -183,7 +189,9 @@ class Annotation {
.split('\n')
.where((line) => line.startsWith(kPrefix))
.firstOrNull;
if (line == null) return const Annotation();
if (line == null) {
return const Annotation();
}

final data =
jsonDecode(line.substring(kPrefix.length)) as Map<String, Object?>;
Expand Down

0 comments on commit 1d81cc4

Please sign in to comment.