-
-
Notifications
You must be signed in to change notification settings - Fork 0
fix(cli): report an ambiguous ... path instead of skipping it silently
#74
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
Changes from all commits
94b6713
393b88e
ac4cae8
80675fc
17fe5fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,9 +25,16 @@ The scan is always recursive, so a path may be written plainly (`./internal`) | |
| or with the Go package-pattern suffix (`./internal/...`); both select the same | ||
| files. With no path at all it scans the current directory. | ||
|
|
||
| _Changed in 0.3._ In 0.2 the pattern spelling was rejected outright — | ||
| `sqlguard scan ./...` failed with `lstat ./...: no such file or directory` — | ||
| so the form used throughout these docs had to be written as `sqlguard scan .`. | ||
| A trailing `...` is always read as the pattern, as it is in every Go tool. If | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Mark the warning as changed behavior. Open this paragraph with 🤖 Prompt for AI AgentsSource: Path instructions |
||
| you genuinely have a directory named `...`, add a trailing slash | ||
| (`./queries/.../`) to address it — and sqlguard says so on stderr when the | ||
| argument is ambiguous, rather than reporting a clean run for a tree it never | ||
| opened. | ||
|
greptile-apps[bot] marked this conversation as resolved.
|
||
|
|
||
| _Changed in 0.3._ Pattern handling as a whole is new, including that warning. | ||
| In 0.2 the spelling was rejected outright — `sqlguard scan ./...` failed with | ||
| `lstat ./...: no such file or directory` — so the form used throughout these | ||
| docs had to be written as `sqlguard scan .`, and no path was ever ambiguous. | ||
|
|
||
| | Flag | Default | Effect | | ||
| | --- | --- | --- | | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KARTIKrocks/sqlguard
Length of output: 16026
🏁 Script executed:
Repository: KARTIKrocks/sqlguard
Length of output: 27171
🌐 Web query:
site:learn.microsoft.com Windows file naming trailing periods directory name ... Win32💡 Result:
🏁 Script executed:
Repository: KARTIKrocks/sqlguard
Length of output: 15774
🏁 Script executed:
Repository: KARTIKrocks/sqlguard
Length of output: 26156
Skip the literal
...fixture on Windows.The short path passed to
os.MkdirAllcan be normalized by Win32, so it may not create a directory named exactly.... Skip this fixture on Windows.🐛 Suggested fix
🤖 Prompt for AI Agents