Skip to content

Commit

Permalink
Fix: Apply InspectOptions.analysisOptionsUri on new scoring. (#764)
Browse files Browse the repository at this point in the history
  • Loading branch information
isoos authored Aug 10, 2020
1 parent b3dd45f commit bc001dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
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

0 comments on commit bc001dd

Please sign in to comment.