"HIGAuditor: Apple's Human Interface Guidelines, as Enforced Rules"

quality-gate

2 min read

Apple’s Human Interface Guidelines are usually a PDF you’re supposed to remember. Here they’re SwiftUI rules the gate can check.


The Human Interface Guidelines are excellent and almost entirely unenforced — they live in a document, and documents don’t run. HIGAuditor takes the checkable subset and turns it into rules that fire on your SwiftUI code at commit time. It’s cross-platform aware: what’s correct on iOS isn’t always correct on macOS, and the auditor knows the difference.

The kinds of thing it catches

Each diagnostic cites its Apple HIG basis, so the finding is a pointer into the actual guideline, not just an opinion. And because it’s SwiftUI-structure-aware (AST, not regex), it can tell a padded 44pt button from a bare 20pt frame, and a genuinely reduce-motion-guarded animation from an unguarded one.

This is where the gate crosses from “will it crash” into “is it right for the person using it” — the same instinct behind the AccessibilityAuditor and the ContextAuditor. Correctness that stops at the compiler misses half of what “correct” means for software people actually touch.

Try it

quality-gate --check hig-auditor

Source: github.com/jpurnell/quality-gate-swift


Tagged with: quality-gate, safety, swift