realm / realm/SwiftLint

Rule Request: Add Class Prefix Rule

Open
#5,714 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

rule-request
Dominant language
Swift
Stars
19.7k
Forks
2.3k
Avg merge
1d 1h
Merged PRs (30d)
11

Description

New Issue Checklist
  • Updated SwiftLint to the latest version
    0.55.1
New rule request

Since XCode has a class prefix setting option, I want a rule to check if public or internal class, enum, struct, and protocol have the prefix. However, it should be configurable to not require for inner class, inner enum, and inner struct to have the prefix. For example, if the prefix is CTA, the name of the first-level class must start with CTA, like CTADataModel.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named in the issue. Start by locating the existing rule and configuration patterns in SwiftLint, then define how the CTA prefix applies to public or internal classes, enums, structs, and protocols and how inner-type exceptions are configured. Done means the rule enforces the requested prefix behavior and has coverage for the stated cases.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.