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

Path used for applies to regex is based on relative path if relative path is provided #589

Closed
gfs opened this issue Jul 29, 2024 · 0 comments · Fixed by #590
Closed

Path used for applies to regex is based on relative path if relative path is provided #589

gfs opened this issue Jul 29, 2024 · 0 comments · Fixed by #590
Labels
bug Something isn't working

Comments

@gfs
Copy link
Contributor

gfs commented Jul 29, 2024

Describe the bug
The path used to check applies to regexes is based on the relative path rather than the absolute path if the user provides a relative path for the source files argument.

To Reproduce
Steps to reproduce the behavior:

  1. Run ApplicationInspector analyze -s relative/path with a file regex for a custom rule
  2. Set a breakpoint in GetRulesByFileName in RuleProcessor.cs
  3. Observe the value of the filename argument

Expected behavior
Paths should always be absolute internally even if the user initially provided a relative path. See also #588

@gfs gfs added the bug Something isn't working label Jul 29, 2024
gfs added a commit that referenced this issue Jul 29, 2024
Convert user provided relative paths into absolute paths before scanning for consistent file name regex behavior in rules.
@gfs gfs closed this as completed in #590 Jul 30, 2024
gfs added a commit that referenced this issue Jul 30, 2024
…analysis (#590)

* Fix #589

Convert user provided relative paths into absolute paths before scanning for consistent file name regex behavior in rules.

* Also use absolute path in error message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant