Currently i am getting the warning "Cyclomatic Complexity Violation: Function should have complexity 8 or less: currently complexity equals 9 (cyclomatic_complexity)"
I want to refactor it so it doesn't show the warning anymore
My code is below
Currently i am getting the warning "Cyclomatic Complexity Violation: Function should have complexity 8 or less: currently complexity equals 9 (cyclomatic_complexity)"
I want to refactor it so it doesn't show the warning anymore
My code is below
if you just want to ignore the error message, you can use this line in .swiftlint.yml. But on the other hand you can prefer switch case and enum structure for functions in postImageViewModel.
# .swiftlint.yml
cyclomatic_complexity: 20