-
Notifications
You must be signed in to change notification settings - Fork 10
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
MissingNullHandler triggered on subflow output variables #67
Comments
@filiprafalowicz I think you are right and this rule outputs a false flag in this particular case. Do you feel comfortable having a look at how we should update this rule and its description? we can support you! Right now its description is: "When a Get Records operation doesn't find any data, it returns null. To ensure data validation, utilize a decision element on the operation result variable to check for a non-null result." |
This comment was marked as off-topic.
This comment was marked as off-topic.
I don't know if this is relevant to this issue, and you meant to post this in another thread? We can already ignore specific flows, rules or elements or combinations of those using the config file although this is perhaps not well documented. I think this issue is more on False Positives reported by the rule MissingNullHandler? is that correct @filiprafalowicz ? |
Yes, this is about false positives reported by the rule. I already used configuration file to make exceptions for them, but I shouldn't have to do it. |
@RubenHalman I think description is still correct, but maybe to make it more accurate it should say something like "To ensure data validation, utilize a decision element on the operation result variable to check for a non-null result before you use it in the subsequent Flow elements." Also, I think I could help and collaborate a little to make changes to these small things that I have been noticing, but in order to do that, I think you need to update readme file a little bit to explain how to work with this core package locally and have smooth development process. |
@filiprafalowicz You are making great points all over the project, thank you. |
I have an Autolaunched Flow that based on provided input variable will run some queries and return results in output variables. Just to have easier steps to reproduce, I have created a sample flow that has
recordId
input variable and based on the prefix it will query either User or Group objects and set output variables with results of the queries:When I run
sf flow scan
command, I get following output:In flows like this, I would expect to not see MissingNullHandler rule violated as there is no point of adding a decision after Get Records. Null check will be handled by the parent flow before variables are used (btw, that could be created as a new rule - do null check on output variables from subflows before you use them). I think quick fix would be to update the rule to not show errors when Get Records is connected directly to the End node.
The text was updated successfully, but these errors were encountered: