enable lint prefer_final_in_for_each (#47724)
This commit is contained in:
committed by
GitHub
parent
fa337f5922
commit
4f9b6cf017
@@ -134,7 +134,7 @@ void _copy(Directory source, Directory target) {
|
||||
if (!target.existsSync())
|
||||
target.createSync(recursive: true);
|
||||
|
||||
for (FileSystemEntity entity in source.listSync(followLinks: false)) {
|
||||
for (final FileSystemEntity entity in source.listSync(followLinks: false)) {
|
||||
final String name = path.basename(entity.path);
|
||||
|
||||
if (entity is Directory) {
|
||||
@@ -165,7 +165,7 @@ class SourceStats {
|
||||
SourceStats getStatsFor(Directory dir, [SourceStats stats]) {
|
||||
stats ??= SourceStats();
|
||||
|
||||
for (FileSystemEntity entity in dir.listSync(recursive: false, followLinks: false)) {
|
||||
for (final FileSystemEntity entity in dir.listSync(recursive: false, followLinks: false)) {
|
||||
final String name = path.basename(entity.path);
|
||||
if (entity is File && name.endsWith('.dart')) {
|
||||
stats.files += 1;
|
||||
|
||||
Reference in New Issue
Block a user