{"repo":"perrystreetsoftware/Harmonize","free":true,"listed":false,"github":"https://github.com/perrystreetsoftware/Harmonize","clone":"git clone https://github.com/perrystreetsoftware/Harmonize.git","description":"Harmonize is a modern linter for Swift that allows you to write architectural lint rules as unit tests. In the era of AI-generated code, it provides your team with deterministic guardrails to keep your codebase clean, maintainable, and consistent as it grows.","language":"Swift","stars":326,"topics":["architecture","ios","linter","swift"],"license":"Apache-2.0","category":"mobile-apps","readme_excerpt":"Harmonize Harmonize is a modern linter for Swift that allows you to assert, validate, and harmonize your code’s structure and architecture by writing lint rules as unit tests—using Quick, XCTest, or Swift Testing. This allows your team to keep your codebase clean, maintainable, and consistent as it grows, without relying on manual code reviews. Harmonize aims to solve the limitations of regex-based linters such as SwiftLint, which focus primarily on Swift style and simple conventions. Inspired by Konsist for Kotlin and ArchUnit for Java, Harmonize provides a richer, semantic way to enforce your project's architecture and structural guidelines. Architectural linters in the era of AI-generated code AI-generated code can help teams move faster, but it can also introduce architectural flaws and subtle bugs that are hard to spot in manual code reviews. Harmonize gives your codebase deterministic guardrails by turning your team’s architectural and structural rules into unit tests. When AI-generated code violates those rules, the tests fail, giving your AI agent clear feedback to fix its own mistakes. Usage With Harmonize, you can write a lint rule similarly as you would write a unit test: Example using Quick: Example using XCTest: Example using Swift Testing: This lint rule enforces all ViewModels to inherit from BaseViewModel . Since it runs as a unit test, it will fail once it detects a violation. You can add exceptions or a baseline to this rule using the withoutName function: Y","default_branch":null,"files":null,"tree":[],"storefront":"/r/perrystreetsoftware","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/perrystreetsoftware/Harmonize/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}