Quality Score: 90/100
Low RiskThis repo is in good health with CI, tests, and active maintenance.
Multiple anti-patterns -10
Maintainability grade
Static analysisHow maintainable the code looks — from complexity, code issues, test presence, file size, and hotspot load. It grades the shape of the code, not defect risk, and doesn't replace review.
A88/100
A ≥ 85, B ≥ 70, C ≥ 55, D ≥ 40, F < 40
Cyclomatic complexityavg 1130/35 Code issues0 errors, 4 warnings19/20 Testspresent · ~100% of files20/20 Largest file1,114 lines11/15 Hotspot load1 high-risk file8/10 Configuration status
CI/CD Pipeline — configured
Test Suite — detected
13,772 test files detected
Stack: Pytest
Where: pylint/plugins/pylint_home_assistant/checkers/tests · tests/auth/mfa_modules · tests/auth/permissions
Test Coverage — ~100%heuristic
13,772 test files / 10,693 source files. This is a file-count ratio, not real line coverage — set up Codecov for authoritative numbers.
Dependency Scanning — 1 tool configured
CodeQL
Top hotspots
Files edited often AND hard to reason about. Churn = recent commit frequency, Complexity = branches and nesting, Risk = both combined. These are the highest-leverage targets for refactoring or testing.
All hotspots
Files that change often and are complex tend to accumulate more bugs
AI-suggested anti-patterns
AI · unverifiedPattern-matches from the file structure and dependencies — useful as hypotheses, but not grounded in actual source. For real findings see Code Scanning above.
Mixed synchronous/asynchronous boundaries without enforcement
HighAuth providers and permission checkers may accidentally call blocking operations; block_async_io guard attempts detection but relies on runtime behavior rather than static typing.
homeassistant/block_async_io.py and auth subsystem
Hardcoded auth provider list without discoverable registry
MediumAdding new auth providers requires modifying core auth module rather than using plugin/entry point system; scales poorly.
homeassistant/auth/providers/__init__.py
Monolithic permission schema in system_policies.py
MediumAll default policies centralized in single file; makes it difficult for integrations to define custom permission types without core changes.
homeassistant/auth/permissions/system_policies.py
Implicit permission merging in merge.py without conflict resolution strategy
MediumPermission merging logic may produce unexpected results when multiple policies conflict; no clear precedence rules.
homeassistant/auth/permissions/merge.py
AI-suggested bottlenecks
AI · unverifiedSpeculation from file structure, not profiling data. Validate against real metrics before acting on these.
I/O and CPU Bottleneck
Sequential credential lookups and JSON deserialization on every login; no caching or indexing of user credentials.
homeassistant/auth/auth_store.py
CPU Bottleneck
Permission resolution traverses full permission tree for every entity/event access check; no caching of computed permissions per user.
homeassistant/auth/permissions/__init__.py
Startup time Bottleneck
Sequential component and integration loading during startup; no parallel initialization of independent components.
homeassistant/bootstrap.py
I/O and disk space Bottleneck
Full state serialization and disk write on every backup; no incremental or differential backup support.
homeassistant/backup_restore.py
Code metrics
Static analysis on sampled source files (up to 15 files).
Avg Cyclomatic Complexity11
Counts if/for/while/switch/catch/ternary branches
Errors / Warnings0 / 4
Secrets, empty catches, console.log, var usage, long lines