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

Usage of ppx_let gives false positive(?) #45

Open
NightBlues opened this issue Mar 1, 2024 · 1 comment
Open

Usage of ppx_let gives false positive(?) #45

NightBlues opened this issue Mar 1, 2024 · 1 comment

Comments

@NightBlues
Copy link

Code like this

let%bind res = somefunc ... in
match res with
...

triggers Using 'function' is recommended alert, though we can't really rewrite this with function.

@Kakadu
Copy link
Owner

Kakadu commented Mar 4, 2024

Yes, it is a kind of false positive. This happens because zanuda analyses typedtree, i.e. the code after macro expansion. This happens also with other syntax extension, AFAIR ppx_show.

The proper way to fix it would be to lookup for function in the parsetree at the same location where it is found in typedtree, but this is not currently implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants