Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no_magic_numbers rule should ignore 100 #5215

Merged
merged 2 commits into from
Sep 11, 2023

Conversation

mildm8nnered
Copy link
Collaborator

@mildm8nnered mildm8nnered commented Sep 9, 2023

The no_magic_numbers rule now ignores 100

I didn't go for any power of 10, as 100 is 97% plus of the cases in one of my large codebases (100 = 4,000+ [includes user readable strings with 14 languages, which bumps it up a fair bit, but still indicative], 1,000 = 94, 10,000 = 12, 100,000 = 10, 1000,000 = 4).

Resolves #5185

@SwiftLintBot
Copy link

SwiftLintBot commented Sep 9, 2023

524 Messages
📖 Linting Aerial with this PR took 1.17s vs 1.16s on main (0% slower)
📖 Linting Alamofire with this PR took 1.52s vs 1.53s on main (0% faster)
📖 Linting Brave with this PR took 8.76s vs 8.74s on main (0% slower)
📖 Linting DuckDuckGo with this PR took 4.25s vs 4.27s on main (0% faster)
📖 Linting Firefox with this PR took 10.11s vs 10.13s on main (0% faster)
📖 Linting Kickstarter with this PR took 10.98s vs 10.97s on main (0% slower)
📖 Linting Moya with this PR took 0.61s vs 0.61s on main (0% slower)
📖 Linting NetNewsWire with this PR took 3.27s vs 3.3s on main (0% faster)
📖 Linting Nimble with this PR took 0.8s vs 0.79s on main (1% slower)
📖 Linting PocketCasts with this PR took 8.61s vs 8.6s on main (0% slower)
📖 Linting Quick with this PR took 0.39s vs 0.39s on main (0% slower)
📖 Linting Realm with this PR took 12.12s vs 12.07s on main (0% slower)
📖 Linting Sourcery with this PR took 2.77s vs 2.77s on main (0% slower)
📖 Linting Swift with this PR took 5.22s vs 5.2s on main (0% slower)
📖 Linting VLC with this PR took 1.52s vs 1.52s on main (0% slower)
📖 Linting Wire with this PR took 8.99s vs 8.97s on main (0% slower)
📖 Linting WordPress with this PR took 13.01s vs 13.03s on main (0% faster)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Models/Aerial.swift:151:69: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Models/Hardware/Battery.swift:59:61: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Models/Prefs/PrefsInfo.swift:312:64: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Models/Prefs/PrefsInfo.swift:325:63: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Views/Layers/BatteryIconLayer.swift:139:27: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Views/Layers/DownloadIndicatorLayer.swift:66:42: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Views/Layers/Weather/WeatherLayer.swift:139:40: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoCommonView.swift:194:44: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoCommonView.swift:196:40: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoSettingsView.swift:47:76: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoSettingsView.swift:62:58: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Alamofire: /Tests/InternalRequestTests.swift:41:22: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Alamofire: /Tests/RequestTests.swift:439:22: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Alamofire: /Tests/RequestTests.swift:468:22: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Alamofire: /Tests/RequestTests.swift:497:22: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Alamofire: /Tests/RequestTests.swift:523:22: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Alamofire: /Tests/RequestTests.swift:551:22: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Alamofire: /Tests/RequestTests.swift:579:26: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Alamofire: /Tests/RequestTests.swift:610:26: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Alamofire: /Tests/RequestTests.swift:641:57: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Alamofire: /Tests/RetryPolicyTests.swift:79:27: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/BrowserViewController/BrowserViewController+P3A.swift:61:15: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/BrowserViewController/BrowserViewController+TabManagerDelegate.swift:85:72: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/BrowserViewController/BrowserViewController+WKNavigationDelegate.swift:1070:64: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/BrowserViewController/BrowserViewController+WKNavigationDelegate.swift:752:17: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/Favorites/FavoritesViewController.swift:198:52: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/Favorites/FavoritesViewController.swift:199:34: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/Favorites/FavoritesViewController.swift:199:77: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/Helpers/ScreenshotHelper.swift:60:50: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/New Tab Page/NewTabPageFeedOverlayView.swift:34:63: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/New Tab Page/NewTabPageFeedOverlayView.swift:50:67: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/New Tab Page/NewTabPageViewController.swift:1078:17: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/New Tab Page/NewTabPageViewController.swift:1085:119: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/New Tab Page/Sections/BraveNewsSectionProvider.swift:539:17: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/New Tab Page/Sections/FavoritesSectionProvider.swift:55:45: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/New Tab Page/Sections/FavoritesSectionProvider.swift:55:88: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/PageZoom/PageZoomSettingsView.swift:79:42: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/PageZoom/PageZoomSettingsView.swift:80:63: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/Playlist/Controllers/PlaylistMoveFolderView.swift:30:21: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/Playlist/Managers & Cache/PlaylistDownloadManager.swift:326:120: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/Playlist/Managers & Cache/PlaylistDownloadManager.swift:546:90: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/Playlist/Managers & Cache/PlaylistManager.swift:509:74: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/Playlist/VideoPlayer/UI/PlaylistParticleEmitter.swift:48:26: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/Playlist/VideoPlayer/UI/PlaylistParticleEmitter.swift:72:21: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/Playlist/VideoPlayer/UI/VideoPlayer.swift:149:25: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/Search/SearchViewController.swift:424:87: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/Search/Voice Search/VoiceSearchInputView.swift:75:23: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/Search/Voice Search/VoiceSearchInputView.swift:75:36: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/TabManager.swift:413:68: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/Toolbars/BottomToolbar/BottomToolbarView.swift:135:23: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Browser/Toolbars/BottomToolbar/BottomToolbarView.swift:137:31: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Settings/Debug/Rewards Internals/QA/RewardsInternalsAutoContributeController.swift:85:110: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Settings/Features/ShieldsPrivacy/Clearables.swift:53:55: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Settings/Features/ShieldsPrivacy/Clearables.swift:74:55: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Settings/Features/ShieldsPrivacy/OtherPrivacySettingsSectionView.swift:37:65: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Shields/ShieldsSwitch.swift:15:43: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Sync/BraveCore/Bookmarks/BookmarkManager.swift:316:48: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/UserContent/UserScripts/Scripts_Dynamic/ScriptHandlers/Sandboxed/SiteStateListenerScriptHandler.swift:116:41: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/Frontend/Widgets/TabsButton.swift:83:30: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Brave/WebFilters/AdBlockEngineManager.swift:28:32: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/BraveUI/SwiftUI/PopupView.swift:125:27: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/BraveUI/SwiftUI/PopupView.swift:125:40: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/BraveVPN/BuyVPNView.swift:207:54: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/BraveVPN/BuyVPNView.swift:428:40: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/BraveVPN/BuyVPNView.swift:428:66: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/BraveVPN/BuyVPNView.swift:476:67: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/BraveVPN/BuyVPNView.swift:493:57: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/BraveWallet/Blockies/BlockieGroup.swift:59:36: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/BraveWallet/Blockies/BlockieGroup.swift:63:36: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/BraveWallet/Blockies/BlockieGroup.swift:67:36: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/BraveWallet/Blockies/Blockies.swift:54:55: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/BraveWallet/Crypto/BuySendSwap/SwapCryptoView.swift:104:41: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/BraveWallet/Crypto/BuySendSwap/SwapCryptoView.swift:107:57: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/BraveWallet/Crypto/BuySendSwap/SwapCryptoView.swift:236:73: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/BraveWallet/Crypto/Market/MarketView.swift:151:135: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/BraveWallet/Crypto/Stores/AssetDetailStore.swift:182:97: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/BraveWallet/Crypto/Stores/AssetDetailStore.swift:196:116: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/BraveWallet/Crypto/Stores/SwapTokenStore.swift:95:47: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/BraveWallet/Crypto/Transaction Confirmations/TransactionStatusView.swift:84:30: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Onboarding/Callouts/OnboardingPlaylistView.swift:136:32: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Onboarding/Welcome/WelcomeViewController.swift:73:64: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Sources/Shared/Extensions/NumberExtensions.swift:14:52: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Tests/ClientTests/TabManagerNavDelegateTests.swift:144:41: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Brave: /Tests/ClientTests/TabManagerNavDelegateTests.swift:144:54: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /Core/BookmarksCachingSearch.swift:197:39: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /Core/TextSizeUserScript.swift:42:81: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /DuckDuckGo/AppUserDefaults.swift:177:56: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /DuckDuckGo/BrowsingMenu/BrowsingMenuAnimator.swift:128:57: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /DuckDuckGo/BrowsingMenu/BrowsingMenuAnimator.swift:129:31: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /DuckDuckGo/BrowsingMenu/BrowsingMenuAnimator.swift:130:32: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /DuckDuckGo/BrowsingMenu/BrowsingMenuAnimator.swift:134:57: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /DuckDuckGo/BrowsingMenu/BrowsingMenuAnimator.swift:134:81: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /DuckDuckGo/BrowsingMenu/BrowsingMenuAnimator.swift:135:31: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /DuckDuckGo/BrowsingMenu/BrowsingMenuAnimator.swift:136:32: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /DuckDuckGo/FavoriteHomeCell.swift:47:36: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /DuckDuckGo/TextSizeSettingsViewController.swift:34:50: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /DuckDuckGo/WaitlistViews.swift:35:63: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Application/UITestAppDelegate.swift:188:51: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Autofill/CreditCard/CreditCardBottomSheet/CreditCardBottomSheetViewModel.swift:269:77: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Autofill/CreditCard/CreditCardBottomSheet/CreditCardBottomSheetViewModel.swift:270:79: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Autofill/CreditCard/CreditCardSettingsView/CreditCardInputViewModel.swift:294:72: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Autofill/CreditCard/CreditCardSettingsView/CreditCardItemRow.swift:68:79: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Autofill/CreditCard/Logic/CreditCardValidator.swift:86:50: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Autofill/CreditCard/ViewComponents/CreditCardInputField.swift:66:30: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Autofill/CreditCard/ViewComponents/CreditCardInputField.swift:67:34: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Browser/BrowserViewController/BrowserViewController+TabToolbarDelegate.swift:114:33: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Browser/BrowserViewController/BrowserViewController+WebViewDelegates.swift:100:76: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Browser/ScreenshotHelper.swift:77:54: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Browser/SearchLoader.swift:95:84: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Browser/SearchViewController.swift:129:57: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Browser/TabScrollController.swift:225:22: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Browser/TabScrollController.swift:225:35: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Browser/Tabs/InactiveTabs/InactiveTabButton.swift:66:85: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Browser/Tabs/InactiveTabs/InactiveTabButton.swift:67:84: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Browser/Tabs/Legacy/LegacyTabTrayViewModel.swift:66:40: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Home/CustomizeHome/CustomizeHomepageSectionViewModel.swift:31:75: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Home/CustomizeHome/CustomizeHomepageSectionViewModel.swift:35:76: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Home/LogoHeader/HomeLogoHeaderViewModel.swift:36:75: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Home/LogoHeader/HomeLogoHeaderViewModel.swift:40:76: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Library/HistoryPanel/HistoryPanel.swift:548:53: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Library/HistoryPanel/HistoryPanelViewModel.swift:291:76: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Widgets/TabsButton.swift:129:30: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/TabManagement/Legacy/LegacyTabManager.swift:355:72: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Client/TabManagement/Legacy/LegacyTabManagerStore.swift:116:69: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in Firefox: /Shared/FeatureSwitch.swift:77:23: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants (no_magic_numbers)
⚠️ Danger found 524 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 142.

Generated by 🚫 Danger

@mildm8nnered mildm8nnered marked this pull request as ready for review September 9, 2023 02:33
Copy link
Collaborator

@SimplyDanny SimplyDanny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@SimplyDanny SimplyDanny merged commit 2df6516 into realm:main Sep 11, 2023
5 checks passed
@mildm8nnered mildm8nnered deleted the mildm8nnered-100-is-not-magic branch September 26, 2023 22:18
KS1019 pushed a commit to KS1019/SwiftLint that referenced this pull request Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no_magic_numbers - Ignore "100" when part of percent conversions
3 participants