ocstyle alternatives and similar libraries
Based on the "Code Quality" category.
Alternatively, view ocstyle alternatives based on common mentions on social networks and blogs.
-
chisel
Chisel is a collection of LLDB commands to assist debugging iOS apps. -
SwiftFormat
A command-line tool and Xcode Extension for formatting Swift code -
FBRetainCycleDetector
iOS library to help detecting retain cycles in runtime. -
FBMemoryProfiler
iOS tool that helps with profiling iOS Memory usage. -
CleanArchitectureRxSwift
Example of Clean Architecture of iOS app using RxSwift -
OCLint
A static source code analysis tool to improve quality and reduce defects for C, C++ and Objective-C -
HeapInspector-for-iOS
Find memory issues & leaks in your iOS app without instruments -
Dotzu
iOS app debugger while using the app. Crash report, logs, network. -
dotenv-linter
⚡️Lightning-fast linter for .env files. Written in Rust 🦀 -
spacecommander
Commit fully-formatted Objective-C as a team without even trying. -
IBAnalyzer
Find common xib and storyboard-related problems without running your app or writing unit tests. -
ODUIThreadGuard
A guard to help you check if you make UI changes not in main thread -
DWURecyclingAlert
Optimizing UITableViewCell For Fast Scrolling -
SwiftCop
SwiftCop is a validation library fully written in Swift and inspired by the clarity of Ruby On Rails Active Record validations. -
Warnings-xcconfig
An xcconfig (Xcode configuration) file for easily turning on a boatload of warnings in your project or its targets. -
Marshroute
Marshroute is an iOS Library for making your Routers simple but extremely powerful -
PSTModernizer
Makes it easier to support older versions of iOS by fixing things and adding missing methods -
Trackable
Trackable is a simple analytics integration helper library. It’s especially designed for easy and comfortable integration with existing projects. -
DecouplingKit
decoupling between modules in your iOS Project. iOS模块化过程中模块间解耦方案 -
AnyLint
Lint anything by combining the power of scripts & regular expressions. -
WeakableSelf
A Swift micro-framework to easily deal with weak references to self inside closures -
UIBaseKit
This helps make the view's configuration code, hierarchy code, and constraint code neat. -
SwiftLinter
Share lint rules between projects and lint changed files with SwiftLint. -
Bugsee
In-app bug and crash reporting with video, logs, network traffic and traces.
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of ocstyle or a related project?
README
ocstyle
Objective-C style checker
Installation
pip install ocstyle
Example
If you have a file called test.m
like this:
@implementation SomeClass
+(void) someMessage:(NSString*)subdomain {
NSString *ShouldStartLowerCase;
// ...
}
@end
and test.h
like this:
@interface SomeClass
+ (void)someMessage:(NSString*)subdomain;
@property NSInteger value;
@end
You can check style like this:
$ ocstyle test.*
test.h
ERROR: 0:-97 [0] - ExpectedInterfaceDocInHeader - Interface requires /** documentation */
ERROR: 3:30 [51] - MissingSpace - Expected 1, got 0
ERROR: 5:1 [65] - ExpectedPropertyDocInHeader - Property requires /** documentation */
test.m
ERROR: 3:2 [28] - MissingSpace - Expected 1, got 0
ERROR: 3:9 [35] - ExtraSpace - Did not expect ' ' here
ERROR: 3:30 [56] - MissingSpace - Expected 1, got 0
ERROR: 3:42 [68] - MissingNewline - Should have newline after ;
ERROR: 3:42 [68] - MissingSemicolon - Expected a semicolon
ERROR: 4:35 [104] - BadLocalVariableName - Local variable must start with a lower case letter```
Goal
Make it easy to share and enforce style rules for Objective C. The less human time we spend thinking about whitespace and naming the better! Also enforces the existence of basic documentation.
At Cue we use this as a git pre-commit hook. This way we ensure everyone maintains a consistent coding style with a minimum of effort.
Related
OCLint runs static analysis that helps to detect common logic errors. Use it alongside ocstyle!
Status
This is a pretty early stage project. We fully expect bugs and feature requests!
One notable absence is that right now style rules are not configurable. For example, we use the following style for message implementations:
+(void) someMessage:(NSString*)subdomain;
{
}
Note the inclusion of the ;
and the {
being on the next line. We like this style because it makes it easy to copy
and paste from .h
to .m
and back, but maybe you have your own preferences. We'd be very happy to accept pull
requests that make ocstyle more configurable.
For the motivated pull requesters out there, other notable TODOs include:
Allow inline disabling of specific errors.
Fix various whitespace false negatives noted in test files
Links
ocstyle is built using parcon, a really nice parser generator library for Python.
Other linters and style checkers we use at Cue include:
Objective C: OCLint
Java: checkstyle
JavaScript: Closure Linter
All: IntelliJ has great code inspections in the editor
License
Apache License version 2.0
Authors
*Note that all licence references and agreements mentioned in the ocstyle README section above
are relevant to that project's source code only.