Repository navigation
Expand file tree
/
Copy pathsonar-project.properties
More file actions
339 lines (324 loc) · 17.6 KB
/
Copy pathsonar-project.properties
File metadata and controls
339 lines (324 loc) · 17.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
sonar.projectKey=thaw-app_Thaw
sonar.organization=thaw-app
# This is name and version displayed in the SonarQube Cloud UI.
# Keep in sync with MARKETING_VERSION in Thaw.xcodeproj.
sonar.projectName = Thaw
sonar.projectVersion = 3.0.0-alpha.16
sonar.sources = Thaw,targets/MenuBarCaptureService
sonar.tests = ThawTests
sonar.exclusions = \
**/*.png,**/*.xcassets/**,**/*.xcstrings,**/*.imageset/**,**/*.icon/**
# Coverage exclusions.
#
# Rule: a file is excluded only when its substance cannot run in a unit test --
# WindowServer/CGS/SkyLight private APIs, Accessibility permissions, Carbon
# hotkey registration, live display/space/running-app state, NSWindow/NSPanel/
# NSView subclasses, SwiftUI View bodies, XPC wiring, or @main entry points.
#
# Pure value types, algorithms, Codable models and parsing stay measured, even
# when they live under a UI-sounding path. Do not reintroduce blanket suffix
# globs (**/*Manager.swift, **/*Settings.swift) or blanket directory globs for
# Items/, ControlItem/, Input/Hotkeys/ and Utilities/ -- each of those buried
# algorithm code that already has dedicated suites in ThawTests.
#
# RevealTurns.swift runs two passes through a live item manager and the
# repair orchestrator. The reduced mode is split the +Live way: the measured
# files keep which apps are offered, what is asked of the kit, the menu, the
# click and URL rules; the +Live companions hold the status item, the saved
# icon, the read of running apps and the call into the kit. Its offer button
# is a SwiftUI view body.
#
# MenuBarItemAXProvider.swift walks every app's extras menu bar over
# Accessibility, and MenuBarLeadingEdgeWatcher.swift follows a live item's
# position; neither runs without a menu bar and the permission. Their pure
# helpers (item frames, the masked chevron rule, the menu bar owner check) keep
# dedicated suites in ThawTests. NewIconSectionFollower is split the +Live way:
# the measured file keeps which new icons follow their app, the +Live
# companion watches the item cache and assigns sections.
#
# ModuleHost is split the +Live way: the measured file keeps the scan, the
# launch verdicts, start and stop and the restart policy, driven by a fake
# system in ThawTests, and ModuleDefaults keeps the first-run checks.
# ModuleHost+Live.swift only fills in the real system: the Modules folder on
# disk, code signature checks, profile files and NSWorkspace launches.
#
# ActiveMenuBarDisplayWatcher is split the same way: the measured file keeps
# the change check, tested with a fake display reader; the +Live companion
# only subscribes to workspace and screen notifications and runs the timer.
#
# AppState+ItemManager is split the same way: the measured file keeps the
# item manager's host calls a test can run against an app state that never
# started; the +Live companion holds the calls into status items, event
# taps, captures and Native hiding, and the setup that starts the manager.
#
# Paths are relative to the project base dir.
# MenuBarItemManager.swift and its MenuBarItemManager+*.swift extensions in
# Items/Manager/ (formerly the MenuBarItemManager/ folder) are excluded as a
# whole, which is the one exception to the rule above. Its substance is
# CGEvent synthesis, AX interaction and live WindowServer state -- none of
# which runs in a unit test. The algorithm code it used to bury has already
# been extracted into LayoutSolver, PendingLedger, AXIdentityCatalog and
# ClickReactionVerifier, all of which stay measured and carry dedicated suites
# in ThawTests. New decision logic belongs in those files, not back in the
# manager.
#
# Sonar globs cannot subtract, so the extensions are listed one by one:
# MenuBarItemManager+ExternalActivation.swift stays measured, and the other
# files in Items/Manager/ are not part of this exception.
# ProfileManager.swift and DisplaySettingsManager.swift were split the same
# way: the measured files keep the manifest/file CRUD, capture, persistence,
# lookup, URI handling and every decision rule, while the +Live companions
# hold the halves that need a running AppState — pushing snapshots into live
# managers, the spacing relaunch wave, NSScreen/WindowServer display state,
# Carbon hotkey registration, Focus Filter intents, and an app-modal alert.
# Capture now takes the three stores it actually reads (settings, appearance
# manager, item manager) instead of the full AppState, so save/update paths
# stay measured; the AppState overloads forwarding to them live in the
# excluded companions. New decision logic belongs in the measured files.
# MenuBarSection.swift and MenuBarItem.swift were split the same way rather
# than excluded whole, because both buried pure logic that the rule above says
# must stay measured.
#
# MenuBarSectionLayout.swift keeps the section names, the presentation modes,
# the notch gap and the three rules that decide how a section is shown.
# MenuBarSection.swift keeps the instance half -- show, hide, toggle,
# updateControlItemState, the rehide task and the mouse-moved monitor -- which
# needs a live ControlItem/NSStatusItem, an AppState and a real NSScreen.
#
# MenuBarItem.swift keeps the value type: capability flags, auto-detected
# naming, identity, Equatable and Hashable. MenuBarItem+Enumeration.swift
# takes the window enumeration, which reaches the window server through
# Bridging/CGS and resolves owning processes over XPC. The unchecked
# initializers and the MenuBarItemTag/Namespace helpers moved with it rather
# than being widened to internal -- they are reachable only from that path.
#
# New decision logic on either type belongs in the measured file.
#
# Settings pages under SettingsPanes/ are listed one by one, not by a wildcard.
# The ones listed are SwiftUI view bodies that no test renders yet. A page a
# render test covers (see SettingsPaneRenderTests) is measured, and so is a new
# page: test it, or extract its decision logic the way MenuBarSectionLayout.swift
# was extracted. Take a page off the list once its tests cover it.
# MenuBarItemTriggersManager.swift was split the ProfileManager way. The
# measured file keeps the decisions: the priority plan that resolves which
# trigger owns which item, identifier resolution across re-instanced items,
# feature availability, runtime status, ownership, CRUD, reordering and
# persistence. MenuBarItemTriggersManager+Live.swift takes setup and its
# observations, the evaluation pass that reads the live item cache, the
# debounced apply, the serial move chain and its retry bookkeeping, reveal
# notifications, script runs and menu bar image capture.
#
# Members the live half needs are internal rather than private, the same
# concession ProfileManager makes. New decision logic belongs in the measured
# file.
# The 2.1.0 trigger and hotkey sources were split along the same seam, for the
# same reason: each one paired a plain value type with a live-system owner, and
# the owner's bulk was drowning the value type's measurement.
#
# SystemState.swift keeps ScriptOutcome and the SystemState snapshot every
# trigger condition is evaluated against. SystemStateMonitor.swift takes the
# aggregation: CoreWLAN, CoreAudio, IOBluetooth, CoreMediaIO, NWPathMonitor,
# CoreLocation, Intents and NSWorkspace observers, none of which produces a
# deterministic reading on a CI runner.
#
# PowerState.swift keeps the snapshot and the IOPS source-list reduction --
# pure dictionary handling, and the part that actually decides whether a
# battery condition matches. PowerSourceMonitor.swift takes the IOKit
# run-loop source and the safety timer.
#
# EnergyMode.swift keeps the mode and its display strings.
# EnergyModeMonitor.swift takes the SCDynamicStore registration.
#
# MenuBarSpacer.swift keeps the value type: the width clamp and the decoder
# that applies it to persisted widths. MenuBarSpacerManager.swift takes the
# NSStatusBar item lifecycle, the autosave-name defaults and the button
# window title assertion.
#
# HotkeyAction.swift keeps the case list, its persisted raw values and
# settingsActions. HotkeyAction+Perform.swift takes the dispatch, whose every
# branch drives a live menu bar, search panel or user notification.
#
# PresentationMonitor.swift is excluded whole rather than split: it is nothing
# but signals -- CGDisplayIsInMirrorSet over NSScreen.screens, and a
# sysctl(KERN_PROC_ALL) walk of the process table -- with no value type to
# separate out.
#
# New decision logic belongs in the measured half of each pair.
# RevealCover.swift was split along the same seam. RevealCoverGeometry.swift
# keeps the band layout, the fade mask, the watchdog deadline rule and the
# cover count. RevealCover.swift takes the NSPanels it lays over the live menu
# bar, the AppState reads that place them, and the tasks that take them down.
# The 3.0 live-system owners below are excluded whole: each one is an
# NSPanel, a status item, an AX walk or press, a SkyLight composite, a Core
# Audio poll or a separate process mode, with no decision logic left inside.
#
# ApplicationMenuCover.swift and ScreenCorners.swift lay panels over the
# live menu bar and screen corners, following the frontmost app.
# OverflowSpacer.swift owns a status item and dumps the live AX trees.
# ItemHints.swift shows its hint panels over the live bar; the badge seat
# it uses moved to ItemHintGeometry.swift, which stays measured.
# MenuBarAXQueries.swift and MenuBarItemDirectPresser.swift read and press
# other apps' items through AX. PositionStoreRecoveryEnvironment.swift wires
# the live store, hosting-surface reader and AX window IDs.
# ItemEnumerationDump.swift walks every app's AX extras to a file; which
# callbacks may receive it moved to ItemEnumerationDump+Callback.swift,
# which stays measured.
# MenuBarWallpaperColorMonitor.swift and its +Capture.swift capture the
# live bar and wallpaper on timers, wake and Space changes; the refresh
# decision is in MenuBarWallpaperColorMonitor+Refresh.swift, which stays
# measured.
# RecordingWatchManager.swift and RecordingDeviceProbe.swift poll Core
# Audio devices and announce on screen.
# MaintenanceTools.swift deletes the user's Library and TCC entries, so it
# must never run in a test; the tccutil arguments and the failure text
# moved to MaintenanceTools+Commands.swift, which stays measured.
# MemoryBench.swift and SettingsProcessApp.swift are the --bench-memory and
# --settings process modes; scripts/check-memory-budget.sh runs the first.
# ResidentBench+Live.swift wires --bench-resident to the live menu bar and
# quits the app; the stages and budget check are in ResidentBench.swift,
# which stays measured.
# Entry points and app lifecycle
sonar.coverage.exclusions = \
Thaw/App/AppDelegate.swift,\
Thaw/App/AppState.swift,\
Thaw/App/ThawApp.swift,\
Thaw/App/NativeVisibilityRecoveryApp.swift,\
Thaw/System/Updates.swift,\
targets/MenuBarCaptureService/*.swift,\
\
Thaw/Input/Events/EventMonitor.swift,\
Thaw/Input/Events/EventTap.swift,\
Thaw/Input/Events/HIDEventManager.swift,\
Thaw/Input/Events/HIDEventManager+*.swift,\
Thaw/Input/Hotkeys/HotkeyRegistry.swift,\
\
Thaw/Utilities/AXHelpers.swift,\
\
Thaw/System/ConflictingAppDetector.swift,\
Thaw/Utilities/IconResource.swift,\
Thaw/Utilities/MouseHelpers.swift,\
\
Thaw/MenuBar/MenuBarManager.swift,\
Thaw/MenuBar/MenuBarSection.swift,\
Thaw/MenuBar/PresentationMonitor.swift,\
Thaw/Items/Manager/MenuBarItemManager.swift,\
Thaw/Items/Manager/MenuBarItemManager+AlphabeticalOrder.swift,\
Thaw/Items/Manager/MenuBarItemManager+Cache.swift,\
Thaw/Items/Manager/MenuBarItemManager+Clicking.swift,\
Thaw/Items/Manager/MenuBarItemManager+ConcealedClick.swift,\
Thaw/Items/Manager/MenuBarItemManager+ControlItemOrder.swift,\
Thaw/Items/Manager/MenuBarItemManager+EventHelpers.swift,\
Thaw/Items/Manager/MenuBarItemManager+LayoutMoveSequence.swift,\
Thaw/Items/Manager/MenuBarItemManager+LayoutReset.swift,\
Thaw/Items/Manager/MenuBarItemManager+ManualMembership.swift,\
Thaw/Items/Manager/MenuBarItemManager+Moving.swift,\
Thaw/Items/Manager/MenuBarItemManager+OpenMethods.swift,\
Thaw/Items/Manager/MenuBarItemManager+Persistence.swift,\
Thaw/Items/Manager/MenuBarItemManager+PositionWriteTrace.swift,\
Thaw/Items/Manager/MenuBarItemManager+PreferredPositionTrust.swift,\
Thaw/Items/Manager/MenuBarItemManager+RestrictionRepair.swift,\
Thaw/Items/Manager/MenuBarItemManager+SplitApps.swift,\
Thaw/Items/Manager/MenuBarItemManager+StartupSettling.swift,\
Thaw/Items/Manager/MenuBarItemManager+VisibleControlDiagnostics.swift,\
Thaw/Items/Manager/MenuBarItemManager+VolatileTitles.swift,\
Thaw/Items/Spacing/MenuBarItemSpacingManager.swift,\
Thaw/Items/Capture/MenuBarItemImageCache.swift,\
Thaw/Items/Capture/MenuBarItemImageCache+*.swift,\
Thaw/Items/Spacers/MenuBarSpacerManager.swift,\
Thaw/MenuBar/ControlItem/ControlItem.swift,\
Thaw/Panels/Search/MenuBarSearchPanel.swift,\
Thaw/MenuBar/Appearance/MenuBarAppearanceManager.swift,\
Thaw/Panels/Appearance/MenuBarOverlayPanel.swift,\
Thaw/Panels/Appearance/Editor/*.swift,\
Thaw/Panels/PopoverAnchor.swift,\
Thaw/MenuBar/RevealTurns.swift,\
Thaw/MenuBar/RevealCover.swift,\
Thaw/System/ReducedMode/*+Live.swift,\
Thaw/System/ReducedMode/ReducedModeOfferButton.swift,\
Thaw/Panels/ThawBar/ThawBar.swift,\
Thaw/Panels/ThawBar/ThawBarColorManager.swift,\
Thaw/Panels/LayoutBar/LayoutBarArrangedView.swift,\
Thaw/Panels/LayoutBar/LayoutBarContainer.swift,\
Thaw/Panels/LayoutBar/LayoutBarItemView.swift,\
Thaw/Panels/LayoutBar/LayoutBarKeyboard.swift,\
Thaw/Panels/LayoutBar/LayoutBarNewItemsBadgeView.swift,\
Thaw/Panels/LayoutBar/LayoutBarPaddingView.swift,\
Thaw/Panels/LayoutBar/LayoutBarScrollView.swift,\
Thaw/Panels/LayoutBar/MenuBarLayoutEditorPanel.swift,\
Thaw/Panels/LayoutEditor/LayoutDropCommit+Live.swift,\
\
Thaw/System/Permissions/PermissionsWindow.swift,\
Thaw/Settings/SettingsPanes/CaptureInspectorSection.swift,\
Thaw/Settings/SettingsPanes/Displays/DisplayIdentifyOverlay.swift,\
Thaw/Settings/SettingsPanes/Displays/ThawBarPreviewParts.swift,\
Thaw/Settings/SettingsPanes/Layout/HiddenItemCaptureButton.swift,\
Thaw/Settings/SettingsPanes/Layout/HidingMethodSection.swift,\
Thaw/Settings/SettingsPanes/Layout/LayoutBarsLoading.swift,\
Thaw/Settings/SettingsPanes/Layout/MenuBarLayoutGroupsSection.swift,\
Thaw/Settings/SettingsPanes/Layout/MenuBarLayoutSettingsPane.swift,\
Thaw/Settings/SettingsPanes/MenuBarHidingSection.swift,\
Thaw/Settings/SettingsPanes/SpacesSettingsPane.swift,\
Thaw/Settings/SettingsPanes/Tools/MenuBarLayoutBackupsSection.swift,\
Thaw/Settings/SettingsPanes/ToolsSettingsPane.swift,\
Thaw/Settings/SettingsView.swift,\
Thaw/Settings/SettingsWindow.swift,\
Thaw/Onboarding/OnboardingPermissionsView.swift,\
Thaw/Settings/Search/SearchViews.swift,\
Thaw/System/UserNotifications/UserNotificationManager.swift,\
\
Thaw/UI/Views/CustomTooltip.swift,\
Thaw/UI/Views/MenuBarItemContainer.swift,\
Thaw/Items/Interaction/MenuBarItemAXProvider.swift,\
Thaw/MenuBar/MenuBarLeadingEdgeWatcher.swift,\
Thaw/MenuBar/NewIconSectionFollower+Live.swift,\
Thaw/Modules/ModuleHost+Live.swift,\
Thaw/MenuBar/ActiveMenuBarDisplayWatcher+Live.swift,\
Thaw/App/AppState+ItemManager+Live.swift,\
\
Thaw/MenuBar/ApplicationMenuCover.swift,\
Thaw/MenuBar/ScreenCorners.swift,\
Thaw/MenuBar/MenuBarWallpaperColorMonitor.swift,\
Thaw/MenuBar/MenuBarWallpaperColorMonitor+Capture.swift,\
Thaw/Items/Spacers/OverflowSpacer.swift,\
Thaw/Items/Interaction/ItemHints.swift,\
Thaw/Items/Interaction/MenuBarAXQueries.swift,\
Thaw/Items/Interaction/MenuBarItemDirectPresser.swift,\
Thaw/Items/Persistence/PositionStoreRecoveryEnvironment.swift,\
Thaw/System/ItemEnumerationDump.swift,\
Thaw/System/MaintenanceTools.swift,\
Thaw/RecordingWatch/RecordingWatchManager.swift,\
Thaw/RecordingWatch/RecordingDeviceProbe.swift,\
Thaw/App/MemoryBench.swift,\
Thaw/App/ResidentBench+Live.swift,\
Thaw/Settings/Process/SettingsProcessApp.swift
sonar.sourceEncoding = UTF-8
# Issue suppressions.
#
# swift:S1075 (URIs should not be hardcoded) fires on the absolute system
# paths a macOS app must shell out to (/bin/sh, /usr/bin/killall,
# /usr/bin/tccutil, launchd state keys) and on stable external service URLs
# such as the Crowdin project. None of these are deployment-configurable
# values an app bundle could discover at runtime, so the rule is disabled
# project-wide instead of scattering NOSONAR comments through launch helpers.
sonar.issue.ignore.multicriteria=s1075,s107a,s107b
sonar.issue.ignore.multicriteria.s1075.ruleKey=swift:S1075
sonar.issue.ignore.multicriteria.s1075.resourceKey=**/*.swift
#
# swift:S107 (too many parameters) on the two value snapshots:
# - SystemState's initializer mirrors the published snapshot one-to-one,
# every field defaulted and keyword-labeled, and doubles as the test
# fixture factory. Grouping the fields into nested structs would turn
# every condition evaluation and fixture into property chains for no
# behavioral gain.
# - MenuBarItemTrigger's initializer mirrors its Codable fields the same
# way.
# The rule stays active everywhere else; move() and moveItem() were
# refactored onto MoveOptions rather than suppressed.
sonar.issue.ignore.multicriteria.s107a.ruleKey=swift:S107
sonar.issue.ignore.multicriteria.s107a.resourceKey=**/SystemState.swift
sonar.issue.ignore.multicriteria.s107b.ruleKey=swift:S107
sonar.issue.ignore.multicriteria.s107b.resourceKey=**/MenuBarItemTrigger.swift
# Coverage is supplied by CI via `-Dsonar.coverageReportPaths=coverage.xml`
# (fresh report on code changes, or the last cached report on docs/chore
# scans — see .github/workflows/ci.yml). Do not set sonar.coverageReportPaths
# here, or cold scans without a report file would fail the scanner.