You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I'm using: semgrep --metrics=off --config ./semgrep-rules.yaml .
Everything works as expected, folders into my .semgrepignore are ignored.
But if I use absolute paths, the .semgrepignore seems not considered: semgrep --metrics=off --config /Users/mynestedfolders/project/semgrep-rules.yaml /Users/mynestedfolders/project/
(note that I tried to used the --project-root parameter from the CLI as specified by semgrep scan --help but it tells me this is no a valid parameter 🤔 )
Thank you,
EDIT: I'm using v1.65.0
The text was updated successfully, but these errors were encountered:
It turns out that the current implementation (i.e. not --experimental, more on this later) reads the .semgrepignore` file in the current folder rather than at the project root. I think it wasn't intended this way, so it's a bug.
Now, we have a new implementation of semgrepignore in the works. It is available with --experimental. It follows the gitignore specification more closely and won't have this particular bug. Passing --project-root shouldn't be necessary, it's an option that has been useful for us for internal testing.
Suggested solutions:
cd into the project root for the duration of the semgrep job: (cd /Users/mynestedfolders/project/ && semgrep --metrics=off --config ./semgrep-rules.yaml .)
or wait for --experimental to become stable or the default (could be a while).
Hi,
When I'm using:
semgrep --metrics=off --config ./semgrep-rules.yaml .
Everything works as expected, folders into my
.semgrepignore
are ignored.But if I use absolute paths, the
.semgrepignore
seems not considered:semgrep --metrics=off --config /Users/mynestedfolders/project/semgrep-rules.yaml /Users/mynestedfolders/project/
(note that I tried to used the
--project-root
parameter from the CLI as specified bysemgrep scan --help
but it tells me this is no a valid parameter 🤔 )Thank you,
EDIT: I'm using
v1.65.0
The text was updated successfully, but these errors were encountered: