normalize pubspec paths

Change-Id: Ic56b9e305714e2c9e716b79b26aaf42e37e2a7a3
Reviewed-on: https://dart-review.googlesource.com/c/78144
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
diff --git a/pkg/analyzer/lib/src/lint/linter.dart b/pkg/analyzer/lib/src/lint/linter.dart
index 577d5e3..a94e348 100644
--- a/pkg/analyzer/lib/src/lint/linter.dart
+++ b/pkg/analyzer/lib/src/lint/linter.dart
@@ -122,7 +122,8 @@
   Iterable<AnalysisErrorInfo> _lintPubspecFile(File sourceFile) =>
       lintPubspecSource(
           contents: sourceFile.readAsStringSync(),
-          sourcePath: sourceFile.absolute.path);
+          sourcePath: options.resourceProvider.pathContext
+              .normalize(sourceFile.absolute.path));
 }
 
 class FileGlobFilter extends LintFilter {