Skip to content

Comments

fix: canonicalize paths in _analyzeFiles to match diagnostic URIs#358

Open
reza-codes wants to merge 1 commit intodart-lang:mainfrom
reza-codes:fix/analyze-files-paths-canonicalization
Open

fix: canonicalize paths in _analyzeFiles to match diagnostic URIs#358
reza-codes wants to merge 1 commit intodart-lang:mainfrom
reza-codes:fix/analyze-files-paths-canonicalization

Conversation

@reza-codes
Copy link

Fixes #295

The diagnostic URIs from the LSP server and the URIs built via
rootUri.resolve(path) can differ on systems with symlinks (e.g., macOS /var → /private/var). This causes the path filter in
_analyzeFiles to match zero entries, returning false "No errors".

Apply fileSystem.path.canonicalize() to both paths before comparison,
matching the pattern already used by isUnderRoot in cli_utils.dart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

analyze_files falsely returns "no errors" in some repos

1 participant