-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Common library variable declared but not used false positive #41
Comments
@aoathout The basic fix is trivial, but the underlying issue is much larger. Maintainers have been splitting the common-dataweave library into multiple files (number-formatter, string-formatter, datetime-formatter, etc.) and marking the functions in common-formatting-lib obsolete. This means there's no longer just one declaration like This makes parsing the DataWeave files (with regular expressions) much harder. Mulint also checks for commented-out lines (assuming they're code), and we're seeing more legitimate comments like As all mulint's What do you think? |
I would agree with your findings. We don't have a language parser for dataweave. While I don't like commented out code, some comments are valid and help guide any developer that has to support things. Maybe in the future when we have time we can think more about convention and do validations on dw then. |
My hope is that MuleSoft will come out with an open source lexer/parser for DataWeave, and we can include some sophisticated static analysis in the future. |
Posted a question on the MuleSoft forums: https://forums.mulesoft.com/questions/102877/dataweave-parser.html (pending moderation) |
(From @aoathout )
In project policyholder-accounts-process-api, we have a library file that exposes a bunch of reusable functions for the api. When I ran mulint I saw this:
[warning] policyholder-account-process-lib.dwl: common library variable "fm" declared but not used
But, when I look in the dwl file I see it is being used (example of one of the funcs that use it):
The text was updated successfully, but these errors were encountered: