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

Do not check macro injected code #102

Merged
merged 4 commits into from
Sep 18, 2022
Merged

Conversation

Premwoik
Copy link
Collaborator

@Premwoik Premwoik commented Jun 13, 2022

This PR should fix #99. The spec position of the forms injected into the module by the use macro shouldn't be checked because it doesn't have the correct line.

Ways how we can filter out injected forms:

  1. Gather the macro_lines (locations that injected forms inherit from the use macro) from the token stream and do not check forms with these lines.
  2. Drop all the forms that do not have a unique line.

Currently, If the token stream exists, it is used to build env that stores info about the analysed module. Then that env can be used to detect the forms injected from the use macro. If the token stream does not exist, the second method is used.

I know that only the second method should be enough, but I feel that collecting this env information can be useful in other places.

@Premwoik Premwoik changed the title Do not check macro injected code [] Do not check macro injected code Jun 13, 2022
@Premwoik Premwoik force-pushed the do-not-check-macro-injected-code branch 2 times, most recently from d251b78 to 7636815 Compare June 14, 2022 23:36
@Premwoik Premwoik marked this pull request as ready for review June 15, 2022 13:57
@Premwoik Premwoik requested a review from erszcz June 15, 2022 13:57
@erszcz erszcz force-pushed the do-not-check-macro-injected-code branch from 7636815 to 6c5f0e5 Compare September 18, 2022 18:53
@erszcz erszcz force-pushed the do-not-check-macro-injected-code branch from fa85f68 to 163834b Compare September 18, 2022 18:59
@erszcz erszcz merged commit d5dd767 into main Sep 18, 2022
@erszcz erszcz deleted the do-not-check-macro-injected-code branch September 18, 2022 19:02
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

Successfully merging this pull request may close these issues.

The spec follows a spec with different name/arity
2 participants