Skip to content

Commit 215a547

Browse files
authored
Make apply_fixes_return a record (#234)
Requested in #232 - [x] I ran `make setup && make` to update the generated code after editing a `.atd` file (TODO: have a CI check) - [x] I made sure we're still backward compatible with old versions of the CLI. For example, the Semgrep backend need to still be able to *consume* data generated by Semgrep 1.17.0. See https://atd.readthedocs.io/en/latest/atdgen-tutorial.html#smooth-protocol-upgrades
1 parent 52befa6 commit 215a547

7 files changed

+190
-68
lines changed

semgrep_output_v1.atd

+8-2
Original file line numberDiff line numberDiff line change
@@ -1531,8 +1531,14 @@ type apply_fixes_params
15311531
}
15321532

15331533
type apply_fixes_return
1534-
<python decorator="dataclass(frozen=True)"> =
1535-
(int * (int * string list) list)
1534+
<python decorator="dataclass(frozen=True)"> = {
1535+
(* Number of files modified *)
1536+
modified_file_count: int;
1537+
(* Each item is a pair, where the first item is the index of the associated
1538+
edit in the input list and the second item is the list of fixed lines
1539+
associated with that edit. *)
1540+
fixed_lines: (int * string list) list;
1541+
}
15361542

15371543
type function_call
15381544
<python decorator="dataclass(frozen=True)"> = [

semgrep_output_v1.jsonschema

+6-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

semgrep_output_v1.proto

+6-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

semgrep_output_v1.py

+14-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

semgrep_output_v1.ts

+12-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

semgrep_output_v1_j.ml

+140-50
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

semgrep_output_v1_j.mli

+4-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)