From b51c3a23dc00e16f8c32e914478f7a0d2c621998 Mon Sep 17 00:00:00 2001 From: Istvan Soos Date: Mon, 10 Aug 2020 12:29:28 +0200 Subject: [PATCH] Fix: Apply InspectOptions.analysisOptionsUri on new scoring. --- CHANGELOG.md | 1 + lib/src/create_report.dart | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01a971614..96f2ebdff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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:** diff --git a/lib/src/create_report.dart b/lib/src/create_report.dart index da0a02aba..9c8df0fb6 100644 --- a/lib/src/create_report.dart +++ b/lib/src/create_report.dart @@ -58,6 +58,7 @@ Future createReport( await _hasDocumentation(packageDir, pubspec), await _multiPlatform(packageDir, pubspec), await _staticAnalysis( + options, packageDir, toolEnvironment, usesFlutter: pubspec.usesFlutter, @@ -99,11 +100,13 @@ Future _hasDocumentation( } Future _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; @@ -156,6 +159,7 @@ Future _staticAnalysis( } Future<_AnalysisResult> _analyzePackage( + InspectOptions options, String packagePath, ToolEnvironment toolEnvironment, { @required bool usesFlutter, @@ -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))