Decrease PerceivedComplexity threshold step by step (from 18 to 10)
Description
By analogy with gitlab-foss#28202 (moved) let's planning decreasing PerceivedComplexity step by step (from 18 to 10)
2017-04-24 data:
Rubocop default level is 7
=> 112 offenses
Some statistics on different benchmarks:
- PerceivedComplexity size
10
=> 33 offences - PerceivedComplexity size
12
=> 11 offences - PerceivedComplexity size
14
=> 6 offences - PerceivedComplexity size
16
=> 3 offences
Proposal
I think that level 10
is achievable in the nearest future. So I prepared checklist for first steps.
Decrease it step by step (values in TODO were checked on 2 Oct 2017):
-
Step to 17 - gitlab-foss!13947 (merged) - no offences in CE and EE
-
Step to 16 - https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2874 -
refactor app/helpers/license_helper.rb:15:3
- EE - PerceivedComplexity = 17 -
refactor app/helpers/tree_helper.rb:111:3
- EE PerceivedComplexity = 17
-
-
Step to 15 - gitlab-foss!14160 (merged) -
refactor app/models/event.rb:242:3
- PerceivedComplexity = 16
-
-
Step to 14 - gitlab-foss!14231 -
refactor app/helpers/projects_helper.rb:30:3
- PerceivedComplexity = 15
-
-
Step to 13 -
refactor app/helpers/nav_helper.rb:10:3
- PerceivedComplexity = 14 -
refactor app/services/projects/create_service.rb:7:5
- PerceivedComplexity = 14 -
refactor lib/gitlab/diff/file.rb:235:7
- PerceivedComplexity = 14 -
refactor lib/gitlab/checks/change_access.rb:145:7
- EE PerceivedComplexity = 14
-
Links / references
Documentation blurb
(Write the start of the documentation of this feature here, include:
- Why should someone use it; what's the underlying problem.
- What is the solution.
- How does someone use this
During implementation, this can then be copied and used as a starter for the documentation.)
Possible labels: gitlab-foss2278656 gitlab-foss506179 meta in GitLab FOSS
Edited by username-removed-864731