Use different line numbers in rule type_body_length for subtypes
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 19.7k
- Forks
- 2.3k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 11
Description
We would like to specify different line numbers to the type_body_length rule when it comes to subtypes in comparison to types. This could either be done by providing an option to the existing rule type_body_length or by creating a new rule named subtype_body_length.
Specifically, we would like to keep the SwiftLint default warnings and error values for type_body_length (which are set at 200 and 350 right now) but we would like to limit the length of subtypey to 20 (warning) and 35 (error).
I would be happy to implement this myself, but which of the two above ways do you think makes more sense? I'm guessing introducing a new rule will be the easier solution. Do you agree?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the existing type_body_length rule and how its warning and error thresholds are configured. Decide whether the requested subtype-specific limits belong as an option or a separate rule, then verify that types retain 200/350 while subtypes use 20/35.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100