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

Add Insufficient_permissions case as a reason to skip a target #304

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions semgrep_output_v1.atd
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,13 @@ type error_span = {
(*****************************************************************************)

(* A reason for skipping a target file or a pair (target, rule).
* Note that this type is also used in Report.ml hence the need
* for deriving show here.
*)
Note that this type is also used in Report.ml hence the need
for deriving show here.

For consistency, please make sure all the JSON constructors use the
same case rules (lowercase, underscores). This is hard to fix later!
Please review your code carefully before committing to interface changes.
*)
type skip_reason <ocaml attr="deriving show"> = [
(* Originally returned by the Python CLI *)
| Always_skipped <json name="always_skipped">
Expand All @@ -630,11 +634,13 @@ type skip_reason <ocaml attr="deriving show"> = [
| Irrelevant_rule <json name="irrelevant_rule">
| Too_many_matches <json name="too_many_matches">
(* New in osemgrep *)
| Gitignore_patterns_match
| Gitignore_patterns_match (* TODO: use JSON lowercase for consistency *)
(* since 1.40.0 (dotfiles were always ignored, but not shown in the skip report *)
| Dotfile
| Dotfile (* TODO: use JSON lowercase for consistency *)
(* since 1.44.0 *)
| Nonexistent_file
| Nonexistent_file (* TODO: use JSON lowercase for consistency *)
(* since 1.94.0 *)
| Insufficient_permissions <json name="insufficient_permissions">
] <ocaml repr="classic">

(* coupling: ugly: with yield_json_objects() in target_manager.py *)
Expand Down
3 changes: 2 additions & 1 deletion semgrep_output_v1.jsonschema

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion semgrep_output_v1.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion semgrep_output_v1.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions semgrep_output_v1.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion semgrep_output_v1_j.ml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion semgrep_output_v1_j.mli

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.