Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve flog metric for Post#extract_quoted_post_numbers #881
This is my first attempt at contributing to Discourse. In order to familiarise myself with the project I have chosen to start out with some code cleanup/refactoring.
I've picked a class that receives an F on Code Climate and picked a method that has a high complexity score - namely
The following are the results of the changes in this PR:
There isn't a significant improvement in the overall flog score of the class but the method shows an improvement.
Oh and tests pass locally :)
I look forward to feedback. If this sort of thing is of value, I am happy to continue with some more refactoring/cleanup for now.