-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
fix: explicit return statements in KnowledgePanels.pm
#7082
Conversation
Kudos, SonarCloud Quality Gate passed! |
KnowledgePanels.pm
KnowledgePanels.pm
For reference, here is the rule: https://metacpan.org/pod/Perl::Critic::Policy::Subroutines::RequireFinalReturn I'm not sure if adding boilerplate return statement adds a lot of value, but I don't have a strong opinion against it. |
I saw that it was being done in ded3dec so I assumed that we would like to add it in. Of course, if you don't want it done, I could stop and focus on a different rule that we may want added? |
Let's implement this rule as you have already done it for many files, as did @Ban3 . I'll approve all the related PRs and we can merge them. But for the future rules to be added, let's discuss them first to see which ones we think will bring the most value. Could you for instance start an issue on GitHub to list a few new rules you think would be good candidates, with maybe 1 or 2 examples of the issues they would trigger in our code? Then we can review them and discuss the benefits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
fix: return statements to KnowledgePanels.pm
fix: return statements to KnowledgePanels.pm
fix: return statements to KnowledgePanels.pm
fix: return statements to KnowledgePanels.pm
Used Perl::Critic to look for functions without return statements. I'm planning on making more PRs similar to this (for all of the other files) and then adding
[Subroutines::RequireFinalReturn]
to .perlcriticrc