hokein added inline comments.
Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:89
+ assert(MatchedDecl->getName().size() > 0);
+ // Skip the check of lowerCamelCase if the name has prefix of special
acronyms
+ if (startsWithSpecialAcronyms(MatchedDecl->getName(), Spec
This revision was automatically updated to reflect the committed changes.
Closed by commit rL318117: add new check for property declaration (authored by
benhamilton).
Repository:
rL LLVM
https://reviews.llvm.org/D39829
Files:
clang-tools-extra/trunk/clang-tidy/objc/CMakeLists.txt
clang-to
Wizard added a comment.
LGTM
https://reviews.llvm.org/D39829
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
benhamilton added a comment.
OK, I updated this diff with the suggested changes. @Wizard, want to take a
look before I land?
https://reviews.llvm.org/D39829
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailm
benhamilton updated this revision to Diff 122739.
benhamilton added a comment.
- Use regex to match acronym prefixes, update tests
https://reviews.llvm.org/D39829
Files:
clang-tidy/objc/CMakeLists.txt
clang-tidy/objc/ObjCTidyModule.cpp
clang-tidy/objc/PropertyDeclarationCheck.cpp
clang-
benhamilton added inline comments.
Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:89
+ assert(MatchedDecl->getName().size() > 0);
+ // Skip the check of lowerCamelCase if the name has prefix of special
acronyms
+ if (startsWithSpecialAcronyms(MatchedDecl->getName(),
Wizard updated this revision to Diff 122714.
Wizard marked 2 inline comments as done.
Wizard added a comment.
address nits
https://reviews.llvm.org/D39829
Files:
clang-tidy/objc/CMakeLists.txt
clang-tidy/objc/ObjCTidyModule.cpp
clang-tidy/objc/PropertyDeclarationCheck.cpp
clang-tidy/obj
hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.
Looks good to me. I (or @benhamilton) will commit the patch for you if
@benhamilton is fine with it.
Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:22
+namespace {
Wizard marked 2 inline comments as done.
Wizard added inline comments.
Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:27
+FixItHint generateFixItHint(const ObjCPropertyDecl *Decl) {
+ if (isupper(Decl->getName()[0])) {
+auto NewName = Decl->getName().str();
---
Wizard updated this revision to Diff 122552.
Wizard marked 9 inline comments as done.
Wizard added a comment.
add custom options
https://reviews.llvm.org/D39829
Files:
clang-tidy/objc/CMakeLists.txt
clang-tidy/objc/ObjCTidyModule.cpp
clang-tidy/objc/PropertyDeclarationCheck.cpp
clang-ti
benhamilton added inline comments.
Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:41
+ objcPropertyDecl(
+ // the property name should be in Lower Camel Case like
+ // 'lowerCamelCase'
benhamilton wrote:
> There are some exception
benhamilton added inline comments.
Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:41
+ objcPropertyDecl(
+ // the property name should be in Lower Camel Case like
+ // 'lowerCamelCase'
There are some exceptions we should special c
Wizard added inline comments.
Comment at: test/clang-tidy/objc-property-declaration.m:8
+@property(assign, nonatomic) int camelCase;
+// CHECK-MESSAGES-NOT: :[[@LINE-1]]:34: warning: property 'camelCase' is not
in proper format according to property naming convention
[objc-prop
hokein added inline comments.
Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:22
+
+/// we will do best effort to generate a fix, however, if the
+/// case can not be solved with a simple fix (e.g. CamelCase
I think we need to update the comment accordin
Wizard added inline comments.
Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:25
+/// we will do best effort to generate a fix, however, if the
+/// case can not be solved with a simple fix (e.g. remove prefix or change
first
+/// character), we will leave the fix to th
Wizard updated this revision to Diff 122319.
Wizard marked 6 inline comments as done.
Wizard added a comment.
address comments
https://reviews.llvm.org/D39829
Files:
clang-tidy/objc/CMakeLists.txt
clang-tidy/objc/ObjCTidyModule.cpp
clang-tidy/objc/PropertyDeclarationCheck.cpp
clang-tidy
benhamilton added inline comments.
Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:25
+/// we will do best effort to generate a fix, however, if the
+/// case can not be solved with a simple fix (e.g. remove prefix or change
first
+/// character), we will leave the fix
benhamilton added inline comments.
Comment at: docs/clang-tidy/checks/objc-property-declaration.rst:7
+Finds property declarations in Objective-C files that do not follow the pattern
+of property names in Google's Objective-C Style Guide. The property name should
+be in the forma
hokein added a comment.
Next time, please remember to add `cfe-commits` to the subscriber.
Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:14
+
+#include
+
Do we need this header?
Comment at: clang-tidy/objc/PropertyDeclarationCheck
19 matches
Mail list logo