From afed12ad5245a4a0c42330291b02359c8c271586 Mon Sep 17 00:00:00 2001 From: Fabio Milano Date: Wed, 12 Dec 2018 09:03:24 -0800 Subject: [PATCH] [CK][Linter Rule] Added CKRenderWithChildrenComponent as conventional component kit superclass Reviewed By: mbouaziz Differential Revision: D13432225 fbshipit-source-id: 57b933cce --- infer/src/clang/ComponentKit.ml | 2 ++ .../linters/componentkit/UnconventionalSuperclassTest.h | 6 ++++++ .../linters/componentkit/UnconventionalSuperclassTest.mm | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/infer/src/clang/ComponentKit.ml b/infer/src/clang/ComponentKit.ml index 295eb1b03..d9c89da40 100644 --- a/infer/src/clang/ComponentKit.ml +++ b/infer/src/clang/ComponentKit.ml @@ -226,6 +226,8 @@ let component_with_unconventional_superclass_advice context an = [ ckcomponent_cl ; ckcomponentcontroller_cl ; "CKCompositeComponent" + ; "CKRenderComponent" + ; "CKRenderWithChildrenComponent" ; "CKStatefulViewComponent" ; "CKStatefulViewComponentController" ; "NTNativeTemplateComponent" ] diff --git a/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.h b/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.h index 815434ac4..84d9c9004 100644 --- a/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.h +++ b/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.h @@ -20,3 +20,9 @@ @interface NativeTemplateComponent : NTNativeTemplateComponent // good @end + +@interface RenderFooComponent : CKRenderComponent // good +@end + +@interface RenderWithChildrenFooComponent : CKRenderWithChildrenComponent // good +@end diff --git a/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.mm b/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.mm index 5c5a616f3..4819245ee 100644 --- a/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.mm +++ b/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.mm @@ -17,3 +17,9 @@ @implementation NativeTemplateComponent @end + +@implementation RenderFooComponent +@end + +@implementation RenderWithChildrenFooComponent +@end