Adds support for sorting @property in obj-c#217
Adds support for sorting @property in obj-c#217bslack wants to merge 4 commits intouncrustify:masterfrom
Conversation
|
It would be nice to see this in uncrustify, can you add test cases for it? Another trick for keeping your /// <#description#>
@property (<#non#>atomic<#, strong#><#, weak#><#, copy#><#, assign#><#, readonly#>) <#type and name#>;Xcode will turn each of those
Of course this isn't nearly as helpful after-the-fact as Brandon's change but it works well for me to keep properties consistent in the first place. The |
|
I will attempt to add test cases when I have time. I am also making a few other additions and will change the attributes/descriptions slightly. |
Conflicts: src/combine.cpp src/options.cpp src/options.h
Block enhancmenets
|
Will add tests for above this weekend or next week. |
|
I just tried this code and I'm getting a bunch of test failures. MISMATCH: 50077 Is there another change that these changes depend on? Commit c68a89b looks like it has most of the changes. |
|
I have more changeable it have not had time to commit. I am hoping to have I'll make sure all tests pass before next submit. Sent from my iPad On Dec 16, 2013, at 9:35 PM, Ben Gardner notifications@github.com wrote: I just tried this code and I'm getting a bunch of test failures. MISMATCH: 50077 Is there another change that these changes depend on? Commit c68a89bhttps://github.com/bengardner/uncrustify/commit/c68a89bfe7562alooks — |
|
Well, Xmas holidays is over. |
Adds ability to sort property semantics. E.g.
@Property (nonatomic, readonly, assign) NSString *foo;
@Property (readonly, assign, nonatomic) NSString *bar;
can become:
@Property (nonatomic, readonly, assign) NSString *foo;
@Property (nonatomic, readonly, assign) NSString *bar;
The implementation is more convoluted then I had hoped/expected. The setter=foobar and getter=barfoo property specifiers messed up my initial implementation a bit and needed to be modified.
Control over the order that items will appear in is controlled via weights. The heigher the weight, the closer to the front it will be.
Don't expect this code to necessarily be accepted, but figured I would make the pull request so its a bit more public and others might pick it up / use it if they want.