Skip to main content

Posts

Showing posts from May, 2019

[iOS] SwiftLint - Linter for Swift

What and Why SwiftLint??? Linter is a specialized tool that analyses our source code and helps us to find errors, bug and indentation issues. As the name suggests  SwiftLint helps us to enforce the coding styles on the swift code and makes us follow its rules and conventions. SwiftLint is an open source project and is maintained by Realm team. There are many  rules  which are defined in SwiftLint. These rules are applied to our code. If any of the compulsory rules are broken SwiftLint will either generate a warning(if not critical) or build will fail(in case of critical). This way developer has to strictly follow the rules before making any pull request and code being merged to the main codebase. This will help us in many ways. In a codebase where many developers are working from junior to senior level, there will be uniformity in writing the code and style. So codebase will be consistent and uniformed throughout. Also, the codebase will be easy to maintain and debug. The more mai