Skip to content

Commit 7ab44ef

Browse files
ntkmenex3
andauthored
Fix dart analyze and format on 3.7.0 (#2513)
Co-authored-by: Natalie Weizenbaum <[email protected]>
1 parent f766f43 commit 7ab44ef

File tree

271 files changed

+20151
-11993
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+20151
-11993
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v4
17-
- uses: dart-lang/setup-dart@v1
18-
- run: dart format --fix .
17+
- uses: ./.github/util/initialize
18+
with: {github-token: "${{ github.token }}"}
19+
- run: dart format .
20+
- run: dart fix --apply
1921
- run: git diff --exit-code
2022

2123
static_analysis:

bin/sass.dart

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,29 @@ Future<void> main(List<String> args) async {
4949
options.futureDeprecations;
5050
options.fatalDeprecations;
5151

52-
var graph = StylesheetGraph(ImportCache(
52+
var graph = StylesheetGraph(
53+
ImportCache(
5354
importers: [...options.pkgImporters, FilesystemImporter.noLoadPath],
54-
loadPaths: options.loadPaths));
55+
loadPaths: options.loadPaths,
56+
),
57+
);
5558
if (options.watch) {
5659
await watch(options, graph);
5760
return;
5861
}
5962

60-
await compileStylesheets(options, graph, options.sourcesToDestinations,
61-
ifModified: options.update);
63+
await compileStylesheets(
64+
options,
65+
graph,
66+
options.sourcesToDestinations,
67+
ifModified: options.update,
68+
);
6269
} on UsageException catch (error) {
6370
print("${error.message}\n");
64-
print("Usage: sass <input.scss> [output.css]\n"
65-
" sass <input.scss>:<output.css> <input/>:<output/> <dir/>\n");
71+
print(
72+
"Usage: sass <input.scss> [output.css]\n"
73+
" sass <input.scss>:<output.css> <input/>:<output/> <dir/>\n",
74+
);
6675
print(ExecutableOptions.usage);
6776
exitCode = 64;
6877
} catch (error, stackTrace) {
@@ -75,7 +84,8 @@ Future<void> main(List<String> args) async {
7584
buffer.writeln();
7685
buffer.writeln();
7786
buffer.write(
78-
Trace.from(getTrace(error) ?? stackTrace).terse.toString().trimRight());
87+
Trace.from(getTrace(error) ?? stackTrace).terse.toString().trimRight(),
88+
);
7989
printError(buffer);
8090
exitCode = 255;
8191
}
@@ -92,8 +102,9 @@ Future<String> _loadVersion() async {
92102
return version;
93103
}
94104

95-
var libDir =
96-
p.fromUri(await Isolate.resolvePackageUri(Uri.parse('package:sass/')));
105+
var libDir = p.fromUri(
106+
await Isolate.resolvePackageUri(Uri.parse('package:sass/')),
107+
);
97108
var pubspec = readFile(p.join(libDir, '..', 'pubspec.yaml'));
98109
return pubspec
99110
.split("\n")

0 commit comments

Comments
 (0)