Skip to content

Commit a5b0cea

Browse files
committed
update
1 parent 43c3237 commit a5b0cea

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

lib/src/language_support/dart_support.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Future<void> fmtDartFile(String filePath) async {
2424
try {
2525
await Process.run('dart', ['format', filePath]);
2626
} catch (_) {
27-
Glog.printRed('Error formatting Dart file at $filePath');
27+
Log.printRed('Error formatting Dart file at $filePath');
2828
}
2929
}
3030

@@ -33,7 +33,7 @@ Future<void> fixDartFile(String filePath) async {
3333
try {
3434
await Process.run('dart', ['fix', '--apply', filePath]);
3535
} catch (_) {
36-
Glog.printRed('Error fixing Dart file at $filePath');
36+
Log.printRed('Error fixing Dart file at $filePath');
3737
}
3838
}
3939

@@ -49,10 +49,7 @@ AnalysisContextCollection createDartAnalysisContextCollection(
4949
String? fallbackDartSdkPath,
5050
) {
5151
final sdkPath = Platform.environment['DART_SDK'] ?? fallbackDartSdkPath;
52-
final includePaths = paths
53-
.toSet()
54-
.map((e) => p.normalize(p.absolute(e)))
55-
.toList();
52+
final includePaths = paths.toSet().map((e) => p.normalize(p.absolute(e))).toList();
5653
final collection = AnalysisContextCollection(
5754
includedPaths: includePaths,
5855
resourceProvider: PhysicalResourceProvider.INSTANCE,

lib/src/language_support/rust_support.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Future<void> fmtRustFile(String filePath) async {
2121
try {
2222
await Process.run('rustfmt', [filePath]);
2323
} catch (_) {
24-
Glog.printRed('Error formatting Rust file at $filePath');
24+
Log.printRed('Error formatting Rust file at $filePath');
2525
}
2626
}
2727

@@ -31,6 +31,6 @@ Future<void> fixRustFile(String filePath) async {
3131
try {
3232
await Process.run('cargo', ['fix', filePath]);
3333
} catch (_) {
34-
Glog.printRed('Error fixing Rust file at $filePath');
34+
Log.printRed('Error fixing Rust file at $filePath');
3535
}
3636
}

lib/src/language_support/ts_js_support.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Future<void> fmtTsJsFile(String filePath) async {
2222
try {
2323
await Process.run('prettier', ['--write', filePath]);
2424
} catch (_) {
25-
Glog.printRed('Error formatting TypeScript/JavaScript file at $filePath');
25+
Log.printRed('Error formatting TypeScript/JavaScript file at $filePath');
2626
}
2727
}
2828

@@ -32,6 +32,6 @@ Future<void> fixTsJsFile(String filePath) async {
3232
try {
3333
await Process.run('eslint', ['--fix', filePath]);
3434
} catch (_) {
35-
Glog.printRed('Error fixing TypeScript/JavaScript file at $filePath');
35+
Log.printRed('Error fixing TypeScript/JavaScript file at $filePath');
3636
}
3737
}

0 commit comments

Comments
 (0)