Google's Objective-C style guide forbids calling or overriding +new to instantiate objects. This check warns on violations.
Style guide reference: https://google.github.io/styleguide/objcguide.html#do-not-use-new
Differential D61350
[clang-tidy] New check calling out uses of +new in Objective-C code mwyman on Apr 30 2019, 3:31 PM. Authored by
Details
Google's Objective-C style guide forbids calling or overriding +new to instantiate objects. This check warns on violations. Style guide reference: https://google.github.io/styleguide/objcguide.html#do-not-use-new
Diff Detail Event Timeline
Comment Actions LGTM modulo the comments from @gribozavr.
Comment Actions Looks good to me once the comments from other reviewers have been addressed. I added a couple suggestions as well.
Comment Actions Update for review comments.
Comment Actions I don't have commit access, so if somebody could submit them that would be wonderful! Comment Actions I believe that all the feedback from @gribozavr has been addressed modulo one small nit. Once that nit has been addressed, I can land this.
Comment Actions Bah, previous changes not caught in Git commit; switching back and forth between Git/Mercurial makes for some mix-ups, I guess.
|
It is unclear whether the check ensures that the code does not use +new, or whether it finds code that does not use +new, this description can be read both ways.
Try: This check finds Objective-C code that ...