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

[Cairo 1.0] Add transform Tree-Sitter -> Generic AST #7757

Merged
merged 4 commits into from
May 8, 2023
Merged

[Cairo 1.0] Add transform Tree-Sitter -> Generic AST #7757

merged 4 commits into from
May 8, 2023

Conversation

Frostweeds
Copy link
Contributor

@Frostweeds Frostweeds commented May 8, 2023

PR checklist:

  • Purpose of the code is evident to future readers
  • Tests included or PR comment includes a reproducible test plan
  • Documentation is up-to-date
  • A changelog entry was added to changelog.d for any user-facing change
  • Change has no security implications (otherwise, ping security team)

If you're unsure about any of this, please see:

@Frostweeds Frostweeds marked this pull request as draft May 8, 2023 12:53
@Frostweeds Frostweeds marked this pull request as ready for review May 8, 2023 14:31

(*****************************************************************************)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a toplevel comment explaining the goal of the module and how it came to be.
For example did you start by copy-pasting code from Parse_rust_tree_sitter.ml?
Or you wrote it from scratch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I copy-pasted everything that was below entry point and I've written everything else from scratch.

When you says "how it came to be" you mean the reason why we wanted to have Cairo 1.0 supported by Semgrep ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I meant how was the code written. For example if lots of it was copy-pasted from Parse_rust_tree_sitter.ml,
that can be useful to know for the reader, because maybe some further update of Rust will lead to further
update of Cairo in which case we could just copy-paste again code from Parse_rust_tree_sitter.ml to Parse_cairo_tree_sitter.ml to save time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it fine like that ?

changelog.d/gh-7757.added Outdated Show resolved Hide resolved
@aryx
Copy link
Collaborator

aryx commented May 8, 2023

you also need to install pre-commit and the right version of ocamlformat.

@aryx
Copy link
Collaborator

aryx commented May 8, 2023

you can try 'make dev-setup'

Copy link
Collaborator

@aryx aryx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need pre-commit and ocamlformat compliant code.

Copy link
Collaborator

@aryx aryx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect

@aryx aryx merged commit 439483a into semgrep:develop May 8, 2023
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants