Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Apply InspectOptions.analysisOptionsUri on new scoring. #764

Merged
merged 1 commit into from
Aug 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Fix: SDK constraint check should use the tool-environment's SDK version.
* Re-added non-ASCII character checks.
* Fix: Malformed UTF-8 files caused markdown checks to fail.
* Fix: Apply InspectOptions.analysisOptionsUri on new scoring.

**BREAKING CHANGES:**

Expand Down
8 changes: 6 additions & 2 deletions lib/src/create_report.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Future<Report> createReport(
await _hasDocumentation(packageDir, pubspec),
await _multiPlatform(packageDir, pubspec),
await _staticAnalysis(
options,
packageDir,
toolEnvironment,
usesFlutter: pubspec.usesFlutter,
Expand Down Expand Up @@ -99,11 +100,13 @@ Future<ReportSection> _hasDocumentation(
}

Future<ReportSection> _staticAnalysis(
InspectOptions options,
String packageDir,
ToolEnvironment toolEnvironment, {
@required bool usesFlutter,
}) async {
final analysisResult = await _analyzePackage(packageDir, toolEnvironment,
final analysisResult = await _analyzePackage(
options, packageDir, toolEnvironment,
usesFlutter: usesFlutter);

final errors = analysisResult.errors;
Expand Down Expand Up @@ -156,6 +159,7 @@ Future<ReportSection> _staticAnalysis(
}

Future<_AnalysisResult> _analyzePackage(
InspectOptions options,
String packagePath,
ToolEnvironment toolEnvironment, {
@required bool usesFlutter,
Expand Down Expand Up @@ -193,7 +197,7 @@ Future<_AnalysisResult> _analyzePackage(
packagePath,
dirs,
usesFlutter,
inspectOptions: InspectOptions(),
inspectOptions: options,
);
final list = LineSplitter.split(output)
.map((s) => parseCodeProblem(s, projectDir: packagePath))
Expand Down