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

feat: --filter-file-path to support relative paths #106

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

leonardochaia
Copy link
Owner

@leonardochaia leonardochaia commented Nov 12, 2024

Adds support for --filter-file-path to support relative paths.

When --filter-file-path is relative, it is always relative to the current working directory, even if a --repository-path is provided

This table covers al supported cases:

Repository Path Filter File Path Expected Repository Path Expected Filter File Path
/home/lchaia/dotnet-affected "" /home/lchaia/dotnet-affected null
"" /home/lchaia/dotnet-affected/Affected.sln /home/lchaia/dotnet-affected /home/lchaia/dotnet-affected/Affected.sln
/home/lchaia/dotnet-affected /home/lchaia/dotnet-affected/subdirectory/other/Affected.sln /home/lchaia/dotnet-affected /home/lchaia/dotnet-affected/subdirectory/other/Affected.sln
"" "" Environment.CurrentDirectory null
"" Affected.sln Environment.CurrentDirectory Path.Join(Environment.CurrentDirectory, "Affected.sln")
/home/lchaia/dotnet-affected Affected.sln /home/lchaia/dotnet-affected Path.Join(Environment.CurrentDirectory, "Affected.sln")

Fixes #105

@leonardochaia leonardochaia merged commit 60dd23b into main Nov 12, 2024
3 checks passed
@leonardochaia leonardochaia deleted the fixes/filter-file-path-relative-support branch November 12, 2024 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

filter-file-path does not work with relative paths
1 participant