-
Notifications
You must be signed in to change notification settings - Fork 21
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
extracting comments not working in assignment #65
Comments
Hello Emanuele! Let me preface this by saying that the comment extraction implementation will never be perfect. Because comments aren't intrinsically associated with a specific statement or expression in your code, gettext-extractor employs some heuristics to try and extract relevant comments. In practice, this means a lot of specific handling for all the different places a call expression can appear in. Now on to your specific issues...
Variable assignments is one of the cases that is not handled yet, but I can add support for that.
With variable declarations, I've made the decision to extract leading comments that come before the variable declaration as a whole. So the following should be extracted properly:
While it's technically possible to additionally extract leading comments after the equals sign, I'd prefer to keep the complexity down and not do that. |
Hi,
That it is perfectly fine for me. |
Comment extraction for variable assignments is fixed in v3.8.0 (not for comments that come after the equals sign though) |
Hi,
it seems that extracting comments is not working properly if the calleName is in an assignment. But not always.
This is what I get:
How to solve this?
Thank you
Emanuele
The text was updated successfully, but these errors were encountered: