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
Why this extension: Most popular GNOME extension; exercises connectObject/disconnectObject signal management (67 signals), prototype backup/restore via #originals map, src/ directory layout, GNOME 50 support (widest version range), CSS-heavy (23.7%), private field usage (#timeoutIds, #originals, #shellVersion), 20 Shell.ui imports
Step 1: ego-lint
./ego-lint --verbose /tmp/just-perfection/src
Results (before fixes)
Status
Count
PASS
202
FAIL
3
WARN
414
SKIP
12
Exit
1
Classification of Each FAIL
Rule
File:Line
TP/FP
Root Cause (if FP)
license
—
FP
LICENSE in repo root, not in src/; no parent-dir fallback for src/ layout
R-VER48-07
stylesheet.css:167
TP
.quick-menu-toggle renamed to .quick-toggle-has-menu in GNOME 48
metadata/future-shell-version
—
TP
GNOME 50 > CURRENT_STABLE (49)
Classification of Key WARNs
Rule
Count
Classification
Notes
R-SLOP-01 (JSDoc @param)
129
FP
Provenance score=3 but threshold was >=4; PR #23 fixes threshold to >=3
R-SLOP-02 (JSDoc @returns)
271
FP
Same root cause as R-SLOP-01
lifecycle/prototype-override
5 (3 unique)
TP + bug
Advisory is valid (prototypes restored via close() chain). Regex catches both override AND restore → duplicates
metadata/uuid-matches-dir
1
FP
Dir is src, not UUID; meaningless for src/ layout
metadata/session-modes-consistency
1
FP
sessionMode.isLocked used as guard — not lock screen functionality
quality/impossible-state
1
FP
Same isLocked guard pattern
quality/comment-density
1
FP
SupportNotifier.js has 40% comments from thorough hand-written JSDoc
metadata/deprecated-version
1
TP
version field ignored by EGO for GNOME 45+
quality/file-complexity
1
TP
Manager.js 1,636 non-blank lines
quality/private-api
1
TP
statusArea access (legitimate for a UI tweaker)
disclosure/private-api
1
TP
Private API not disclosed in metadata description
Fixes Implemented
False Positives Fixed
Rule/Check
Root Cause
Fix
license (FAIL)
No parent-dir fallback for src/ layout
ego-lint.sh: check parent dir when basename == "src"
metadata/uuid-matches-dir
Dir is src for src/ layout
check-metadata.py: skip when dir_name == "src"
session-modes-consistency
isLocked is always a guard
check-metadata.py: narrow regex to sessionMode.currentMode only
quality/impossible-state
isLocked is always a guard
check-quality.py: remove isLocked from check, keep currentMode comparisons
quality/comment-density
40% threshold too aggressive
check-quality.py: raise threshold from 40% to 50%
lifecycle/prototype-override (dupes)
Regex matches override + restore
check-lifecycle.py: deduplicate by (file, prototype) key
Test Fixtures Added
Fixture
What It Tests
src-license-fallback@test
License found in parent dir for src/ layout; UUID-dir skip
islocked-guard@test
sessionMode.isLocked guard not flagged as impossible-state or session-modes inconsistency
proto-override-dedup@test
Each prototype warned only once despite override + restore pattern
sessionMode.isLocked is always a guard: Reading lock state to decide behavior is defensive coding, not lock screen functionality. Only currentMode === 'unlock-dialog' comparisons suggest active lock screen mode usage.
src/ layout needs holistic support: License check and UUID-dir match didn't handle src/ layout. Multiple checks already had src/ fallbacks (CSS, prefs, metadata), but these two were missed. Consider auditing all checks for src/ layout awareness.
Prototype override + restore creates duplicates: When an extension stores originals and restores them (Just Perfection's #originals map pattern), the same regex catches both the override and the restore. Deduplication by (file, prototype_name) is essential.
Comment-density threshold interacts with provenance: Well-documented hand-written code (provenance=3) naturally has higher comment density (40%+) from thorough JSDoc. The 40% threshold was too aggressive; 50% avoids FPs while still catching AI slop (typically 55-70%).
Just Perfection validates PR #23: Provenance score=3 with 400 JSDoc warnings confirms the threshold change from >=4 to >=3 is needed.
Issues Created
#26: false-positive: license check fails on src/ layout extensions
#27: false-positive: isLocked guard flagged as impossible-state and session-modes inconsistency