Rule for enforcing no hardcoded string for identifiers.
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 19.7k
- Forks
- 2.3k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 11
Description
I am using R.swift in my project which gives strong type for resources such as image names, segue identifiers, nib names, storyboard names. Is there a way to enforce that there is no hard coded string used in these cases in the code?
For e.g. I don't want people to use something like this: UIImage(named: "some-image").
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
The issue names no files or tests. Start by reading SwiftLint's existing rule and test conventions, then investigate how it could distinguish resource identifiers from ordinary strings in UIImage(named:), segue, nib, and storyboard uses; done means the requested hardcoded-string cases are enforceable with clear diagnostics.
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
- Needs clarification
- Newbie friendliness
- 25/100