custom_rules violations are not reported in a deterministic order · Issue #6058 · realm/SwiftLint · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New Issue Checklist
Bug Description
Given two custom rules, named
aaa
andbbb
, withregex
s matching their names (config follows below), and the following input:and the following command:
The order that the violations are reported in is not deterministic:
It looks like the root of the problem is that
custom_rules
are stored in a dictionary, so the ordering from the configuration files is lost.In
CustomRules.swift
, we build up the list of custom rules by iterating over a dictionary:We should probably sort by name here, to match the way other rules are treated, which is a bit weird.
Environment
swiftlint version
to be sure)0.59.1
xcodebuild -version
to be sure)homebrew
Are you using nested configurations?
No
The text was updated successfully, but these errors were encountered: