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

[#26] Drop aleppo and use a forked epp_dodger #31

Merged
merged 8 commits into from
Dec 2, 2019

Conversation

jfacorro
Copy link
Contributor

@jfacorro jfacorro commented Nov 29, 2019

A lot of the issues around macros have been caused by the fact that we are using the aleppo library to reproduce the behaviour of the erlang pre-processor but applied to text instead of files.

Recent work on erlang-ls has shown that using the epp_dodger module, could be a more robust approach. Sadly this module doesn't provide a lot of configuration of customization throught its API, therefore this PRs "forks" it so that the parsed forms include the text in their nodes.

I ran elvis_core's tests with these changes and I have a branch where all tests pass with minimal changes.

Fixes #26.

After adding a test that tries to parse all OTP .erl files, there were
some issues found with some modules. These issues are addressed by either
ignoring unparsable code and/or replacing it with dummy values.
@elbrujohalcon
Copy link
Member

I think you need to push changes to rebar.lock as well.

Copy link
Member

@elbrujohalcon elbrujohalcon left a comment

Choose a reason for hiding this comment

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

I think you need to push changes to rebar.lock as well.

@jfacorro
Copy link
Contributor Author

jfacorro commented Dec 1, 2019

@elbrujohalcon Yes, I missed that, I will add it to the PR. I also need to remove ktn_code:parse_tree/[2,3] functions since the current parsing strategy does not require include files or the name of the file being parsed.

@jfacorro
Copy link
Contributor Author

jfacorro commented Dec 1, 2019

The elvis check in ktn_code_meta_SUITE is failing because elvis_core is curently using ktn_code:parse_tree/2, but once all libraries are updated then everything will be fine.

@elbrujohalcon elbrujohalcon merged commit fbd26a1 into master Dec 2, 2019
@elbrujohalcon elbrujohalcon deleted the 26-wrong-ignored-variable-being-used branch December 2, 2019 11:23
bjosv added a commit to Nordix/brod that referenced this pull request Apr 14, 2020
The latest elvis is using a new version of katana_code,
which has replaced the pre-processor handling, see:
inaka/katana-code#31

This has changed the behavior of elvis to also check code
defined in TEST scope.
bjosv added a commit to Nordix/brod that referenced this pull request Apr 20, 2020
The latest elvis is using a new version of katana_code,
which has replaced the pre-processor handling, see:
inaka/katana-code#31

This has changed the behavior of elvis to also check code
defined in TEST scope.
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.

‘Ignored variable is being used’ reported for non-variables
2 participants