我想使用 uncrustify 在冒号上对齐我的参数,并取得一些有限的成功。
使用Can Uncrustify 中的信息可以在 Objective-C 方法调用中对齐冒号吗?我的配置文件中有以下内容:
align_oc_decl_colon = true
align_oc_msg_colon_span = 20
我的.m
-files 看起来很棒,如下所示:
- (id)initWithStreetName:(NSString *)streetName
areaCode:(NSString *)areaCode
city:(NSString *)city
country:(NSString *)country
positionLatitude:(NSString *)positionLatitude
positionLongitude:(NSString *)positionLongitude
serverAssignmentId:(NSString *)serverAssignmentId
comment:(NSString *)comment
timestamp:(NSDate *)timestamp
status:(AssignmentStatus)status
但同样的方法在标题中看起来像这样:
- (id)initWithStreetName:(NSString *)streetName
areaCode :(NSString *)areaCode
city :(NSString *)city
country :(NSString *)country
positionLatitude :(NSString *)positionLatitude
positionLongitude :(NSString *)positionLongitude
serverAssignmentId :(NSString *)serverAssignmentId
comment :(NSString *)comment
timestamp :(NSDate *)timestamp
status :(AssignmentStatus)status;
关于如何让标头代码看起来像实现代码的任何想法?