Details
Diff Detail
- Repository
- rCTE Clang Tools Extra
Event Timeline
Can you add test cases for non-plural acronyms in the middle of the string and plural acronyms at the start/end of the string, please?
clang-tidy/objc/PropertyDeclarationCheck.cpp | ||
---|---|---|
138–140 | Why do we not allow plural acronyms at the start of the property name? For example: @property(nonatomic) NSArray<NSString *> *URLsToFetch; should be allowed. | |
140 | Why do we not allow singular acronyms in the middle of the property name? I think we should allow singular and plural acronyms anywhere. |
resolve comments
clang-tidy/objc/PropertyDeclarationCheck.cpp | ||
---|---|---|
138–140 | Hmm I was thinking that prefix should not have plural form. Will enable plural forms everywhere. | |
140 | Actually we do. AcronymsGroupRegex(EscapedAcronyms, true) will support both while AcronymsGroupRegex(EscapedAcronyms, false) only supports singular. Will update test cases. |
clang-tidy/objc/PropertyDeclarationCheck.cpp | ||
---|---|---|
138–140 | Since AcronymsGroupRegex() is called twice with the same parameter, please store the result in a local variable instead of doing the work twice. | |
140 | Ah, this is why I find boolean flags to be confusing :) Anyway, it's gone now. | |
test/clang-tidy/objc-property-declaration.m | ||
12 | Add a check for a plural at the end, please. |
Why do we not allow plural acronyms at the start of the property name? For example:
should be allowed.