realm / realm/SwiftLint

Implement rule-level `warning_threshold`

Open
#5,469 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion enhancement
Dominant language
Swift
Stars
19.7k
Forks
2.3k
Avg merge
1d 1h
Merged PRs (30d)
11

Description

New Issue Checklist

It would be great to be able to override warning threshold for a specific rule. If threshold was specified for a rule, its violations would not be counted for the main threshold and throw an error only in terms of its own limit.

In our projects we set warning_threshold to 0 to prevent any violations of included rules. We also regularly include new rules and temporarily increase the warning_threshold to allow violations for the the rule we are working on until we completely fix it everywhere. But this allows violations of other rules to appear.

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 or tests are named. Start by tracing how the global warning_threshold is configured and how rule violations are counted, then inspect existing configuration and threshold tests. Done means a rule-specific threshold can exclude that rule from the global limit while enforcing its own limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
cli, 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.