xcodebuild-helper 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.codeclimate.yml +20 -0
- data/.gitignore +1 -0
- data/.rspec +2 -0
- data/.travis.yml +7 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +110 -0
- data/Guardfile +18 -0
- data/README.md +7 -0
- data/Rakefile +7 -0
- data/TODO.md +3 -0
- data/bin/oclint +5 -0
- data/bin/oclint-0.8 +5 -0
- data/bin/oclint-json-compilation-database +5 -0
- data/bin/oclint-xcodebuild +5 -0
- data/externals/oclint/LICENSE +69 -0
- data/externals/oclint/bin/oclint +0 -0
- data/externals/oclint/bin/oclint-0.10.2 +0 -0
- data/externals/oclint/bin/oclint-json-compilation-database +88 -0
- data/externals/oclint/bin/oclint-xcodebuild +218 -0
- data/externals/oclint/lib/clang/3.7.0/asan_blacklist.txt +13 -0
- data/externals/oclint/lib/clang/3.7.0/include/Intrin.h +958 -0
- data/externals/oclint/lib/clang/3.7.0/include/__stddef_max_align_t.h +43 -0
- data/externals/oclint/lib/clang/3.7.0/include/__wmmintrin_aes.h +72 -0
- data/externals/oclint/lib/clang/3.7.0/include/__wmmintrin_pclmul.h +34 -0
- data/externals/oclint/lib/clang/3.7.0/include/adxintrin.h +88 -0
- data/externals/oclint/lib/clang/3.7.0/include/altivec.h +13528 -0
- data/externals/oclint/lib/clang/3.7.0/include/ammintrin.h +215 -0
- data/externals/oclint/lib/clang/3.7.0/include/arm_acle.h +304 -0
- data/externals/oclint/lib/clang/3.7.0/include/arm_neon.h +68419 -0
- data/externals/oclint/lib/clang/3.7.0/include/avx2intrin.h +1256 -0
- data/externals/oclint/lib/clang/3.7.0/include/avx512bwintrin.h +1250 -0
- data/externals/oclint/lib/clang/3.7.0/include/avx512cdintrin.h +131 -0
- data/externals/oclint/lib/clang/3.7.0/include/avx512dqintrin.h +242 -0
- data/externals/oclint/lib/clang/3.7.0/include/avx512erintrin.h +285 -0
- data/externals/oclint/lib/clang/3.7.0/include/avx512fintrin.h +2457 -0
- data/externals/oclint/lib/clang/3.7.0/include/avx512vlbwintrin.h +1907 -0
- data/externals/oclint/lib/clang/3.7.0/include/avx512vldqintrin.h +353 -0
- data/externals/oclint/lib/clang/3.7.0/include/avx512vlintrin.h +1982 -0
- data/externals/oclint/lib/clang/3.7.0/include/avxintrin.h +1308 -0
- data/externals/oclint/lib/clang/3.7.0/include/bmi2intrin.h +99 -0
- data/externals/oclint/lib/clang/3.7.0/include/bmiintrin.h +153 -0
- data/externals/oclint/lib/clang/3.7.0/include/cpuid.h +209 -0
- data/externals/oclint/lib/clang/3.7.0/include/cuda_builtin_vars.h +110 -0
- data/externals/oclint/lib/clang/3.7.0/include/emmintrin.h +1480 -0
- data/externals/oclint/lib/clang/3.7.0/include/f16cintrin.h +63 -0
- data/externals/oclint/lib/clang/3.7.0/include/float.h +124 -0
- data/externals/oclint/lib/clang/3.7.0/include/fma4intrin.h +236 -0
- data/externals/oclint/lib/clang/3.7.0/include/fmaintrin.h +234 -0
- data/externals/oclint/lib/clang/3.7.0/include/fxsrintrin.h +55 -0
- data/externals/oclint/lib/clang/3.7.0/include/htmintrin.h +226 -0
- data/externals/oclint/lib/clang/3.7.0/include/htmxlintrin.h +363 -0
- data/externals/oclint/lib/clang/3.7.0/include/ia32intrin.h +101 -0
- data/externals/oclint/lib/clang/3.7.0/include/immintrin.h +203 -0
- data/externals/oclint/lib/clang/3.7.0/include/inttypes.h +102 -0
- data/externals/oclint/lib/clang/3.7.0/include/iso646.h +43 -0
- data/externals/oclint/lib/clang/3.7.0/include/limits.h +118 -0
- data/externals/oclint/lib/clang/3.7.0/include/lzcntintrin.h +72 -0
- data/externals/oclint/lib/clang/3.7.0/include/mm3dnow.h +167 -0
- data/externals/oclint/lib/clang/3.7.0/include/mm_malloc.h +75 -0
- data/externals/oclint/lib/clang/3.7.0/include/mmintrin.h +507 -0
- data/externals/oclint/lib/clang/3.7.0/include/module.modulemap +196 -0
- data/externals/oclint/lib/clang/3.7.0/include/nmmintrin.h +35 -0
- data/externals/oclint/lib/clang/3.7.0/include/pmmintrin.h +122 -0
- data/externals/oclint/lib/clang/3.7.0/include/popcntintrin.h +50 -0
- data/externals/oclint/lib/clang/3.7.0/include/prfchwintrin.h +39 -0
- data/externals/oclint/lib/clang/3.7.0/include/rdseedintrin.h +59 -0
- data/externals/oclint/lib/clang/3.7.0/include/rtmintrin.h +59 -0
- data/externals/oclint/lib/clang/3.7.0/include/s390intrin.h +39 -0
- data/externals/oclint/lib/clang/3.7.0/include/sanitizer/allocator_interface.h +66 -0
- data/externals/oclint/lib/clang/3.7.0/include/sanitizer/asan_interface.h +155 -0
- data/externals/oclint/lib/clang/3.7.0/include/sanitizer/common_interface_defs.h +118 -0
- data/externals/oclint/lib/clang/3.7.0/include/sanitizer/coverage_interface.h +63 -0
- data/externals/oclint/lib/clang/3.7.0/include/sanitizer/dfsan_interface.h +114 -0
- data/externals/oclint/lib/clang/3.7.0/include/sanitizer/linux_syscall_hooks.h +3070 -0
- data/externals/oclint/lib/clang/3.7.0/include/sanitizer/lsan_interface.h +84 -0
- data/externals/oclint/lib/clang/3.7.0/include/sanitizer/msan_interface.h +107 -0
- data/externals/oclint/lib/clang/3.7.0/include/sanitizer/tsan_interface_atomic.h +222 -0
- data/externals/oclint/lib/clang/3.7.0/include/shaintrin.h +79 -0
- data/externals/oclint/lib/clang/3.7.0/include/smmintrin.h +487 -0
- data/externals/oclint/lib/clang/3.7.0/include/stdalign.h +35 -0
- data/externals/oclint/lib/clang/3.7.0/include/stdarg.h +52 -0
- data/externals/oclint/lib/clang/3.7.0/include/stdatomic.h +190 -0
- data/externals/oclint/lib/clang/3.7.0/include/stdbool.h +44 -0
- data/externals/oclint/lib/clang/3.7.0/include/stddef.h +137 -0
- data/externals/oclint/lib/clang/3.7.0/include/stdint.h +707 -0
- data/externals/oclint/lib/clang/3.7.0/include/stdnoreturn.h +30 -0
- data/externals/oclint/lib/clang/3.7.0/include/tbmintrin.h +154 -0
- data/externals/oclint/lib/clang/3.7.0/include/tgmath.h +1374 -0
- data/externals/oclint/lib/clang/3.7.0/include/tmmintrin.h +230 -0
- data/externals/oclint/lib/clang/3.7.0/include/unwind.h +282 -0
- data/externals/oclint/lib/clang/3.7.0/include/vadefs.h +65 -0
- data/externals/oclint/lib/clang/3.7.0/include/varargs.h +26 -0
- data/externals/oclint/lib/clang/3.7.0/include/vecintrin.h +8946 -0
- data/externals/oclint/lib/clang/3.7.0/include/wmmintrin.h +42 -0
- data/externals/oclint/lib/clang/3.7.0/include/x86intrin.h +81 -0
- data/externals/oclint/lib/clang/3.7.0/include/xmmintrin.h +1008 -0
- data/externals/oclint/lib/clang/3.7.0/include/xopintrin.h +809 -0
- data/externals/oclint/lib/clang/3.7.0/include/xtestintrin.h +41 -0
- data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.asan_iossim_dynamic.dylib +0 -0
- data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib +0 -0
- data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.builtins-i386.a +0 -0
- data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.builtins-x86_64.a +0 -0
- data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.profile_osx.a +0 -0
- data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.safestack_osx.a +0 -0
- data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.ubsan_iossim_dynamic.dylib +0 -0
- data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib +0 -0
- data/externals/oclint/lib/oclint/reporters/libHTMLReporter.dylib +0 -0
- data/externals/oclint/lib/oclint/reporters/libJSONReporter.dylib +0 -0
- data/externals/oclint/lib/oclint/reporters/libPMDReporter.dylib +0 -0
- data/externals/oclint/lib/oclint/reporters/libTextReporter.dylib +0 -0
- data/externals/oclint/lib/oclint/reporters/libXMLReporter.dylib +0 -0
- data/externals/oclint/lib/oclint/reporters/libXcodeReporter.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libAvoidBranchingStatementAsLastInLoopRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libAvoidDefaultArgumentsOnVirtualMethodsRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libAvoidPrivateStaticMembersRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libBaseClassDestructorShouldBeVirtualOrProtectedRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libBitwiseOperatorInConditionalRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libBrokenNullCheckRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libBrokenOddnessCheckRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libCollapsibleIfStatementsRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libConstantConditionalOperatorRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libConstantIfExpressionRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libCoveredSwitchStatementsDontNeedDefaultRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libCyclomaticComplexityRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libDeadCodeRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libDefaultLabelNotLastInSwitchStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libDestructorOfVirtualClassRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libDoubleNegativeRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libEmptyCatchStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libEmptyDoWhileStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libEmptyElseBlockRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libEmptyFinallyStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libEmptyForStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libEmptyIfStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libEmptySwitchStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libEmptyTryStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libEmptyWhileStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libForLoopShouldBeWhileLoopRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libGotoStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libInvertedLogicRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libJumbledIncrementerRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libLongClassRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libLongLineRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libLongMethodRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libLongVariableNameRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libMisplacedNullCheckRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libMissingBreakInSwitchStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libMultipleUnaryOperatorRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libNPathComplexityRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libNcssMethodCountRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libNestedBlockDepthRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libNonCaseLabelInSwitchStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCAssignIvarOutsideAccessorsRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCBoxedExpressionsRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCContainerLiteralsRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCNSNumberLiteralsRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCObjectSubscriptingRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCVerifyIsEqualHashRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCVerifyMustCallSuperRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCVerifyProhibitedCallRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCVerifyProtectedMethodRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCVerifySubclassMustImplementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libParameterReassignmentRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libPreferEarlyExitRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libRedundantConditionalOperatorRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libRedundantIfStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libRedundantLocalVariableRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libRedundantNilCheckRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libReturnFromFinallyBlockRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libShortVariableNameRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libSwitchStatementsShouldHaveDefaultRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libThrowExceptionFromFinallyBlockRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libTooFewBranchesInSwitchStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libTooManyFieldsRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libTooManyMethodsRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libTooManyParametersRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libUnnecessaryElseStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libUnnecessaryNullCheckForCXXDeallocRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libUnusedLocalVariableRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libUnusedMethodParameterRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libUselessParenthesesRule.dylib +0 -0
- data/lib/coverage_plan.rb +19 -0
- data/lib/device.rb +27 -0
- data/lib/execute.rb +7 -0
- data/lib/lint_plan.rb +41 -0
- data/lib/rules.rb +23 -0
- data/lib/test_plan.rb +11 -0
- data/lib/version.rb +3 -0
- data/lib/xcode.rb +128 -0
- data/lib/xcodebuild-helper.rb +110 -0
- data/spec/coverage_plan_spec.rb +18 -0
- data/spec/device_spec.rb +24 -0
- data/spec/lint_plan_spec.rb +35 -0
- data/spec/rule_spec.rb +37 -0
- data/spec/spec_helper.rb +17 -0
- data/spec/test_plan_spec.rb +11 -0
- data/spec/xcode_dsl_actions_spec.rb +136 -0
- data/spec/xcode_dsl_spec.rb +176 -0
- data/spec/xcode_spec.rb +79 -0
- data/xcodebuild-helper.gemspec +26 -0
- metadata +327 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*===---- xtestintrin.h - XTEST intrinsic ---------------------------------===
|
|
2
|
+
*
|
|
3
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
* in the Software without restriction, including without limitation the rights
|
|
6
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
* furnished to do so, subject to the following conditions:
|
|
9
|
+
*
|
|
10
|
+
* The above copyright notice and this permission notice shall be included in
|
|
11
|
+
* all copies or substantial portions of the Software.
|
|
12
|
+
*
|
|
13
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19
|
+
* THE SOFTWARE.
|
|
20
|
+
*
|
|
21
|
+
*===-----------------------------------------------------------------------===
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
#ifndef __IMMINTRIN_H
|
|
25
|
+
#error "Never use <xtestintrin.h> directly; include <immintrin.h> instead."
|
|
26
|
+
#endif
|
|
27
|
+
|
|
28
|
+
#ifndef __XTESTINTRIN_H
|
|
29
|
+
#define __XTESTINTRIN_H
|
|
30
|
+
|
|
31
|
+
/* xtest returns non-zero if the instruction is executed within an RTM or active
|
|
32
|
+
* HLE region. */
|
|
33
|
+
/* FIXME: This can be an either or for RTM/HLE. Deal with this when HLE is
|
|
34
|
+
* supported. */
|
|
35
|
+
static __inline__ int
|
|
36
|
+
__attribute__((__always_inline__, __nodebug__, __target__("rtm")))
|
|
37
|
+
_xtest(void) {
|
|
38
|
+
return __builtin_ia32_xtest();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
#endif
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/externals/oclint/lib/oclint/rules/libBaseClassDestructorShouldBeVirtualOrProtectedRule.dylib
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module XCodeBuildHelper
|
|
2
|
+
class CoveragePlan
|
|
3
|
+
def report_type(name)
|
|
4
|
+
@report_type = name
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
def get_report_type
|
|
8
|
+
@report_type
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def source_files(name)
|
|
12
|
+
@source_files = name
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def get_source_files
|
|
16
|
+
@source_files
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
data/lib/device.rb
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
module XCodeBuildHelper
|
|
2
|
+
class Device
|
|
3
|
+
def platform(name)
|
|
4
|
+
@platform = name
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
def get_platform
|
|
8
|
+
@platform
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def name (device_name)
|
|
12
|
+
@device_name = device_name
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def get_name
|
|
16
|
+
@device_name
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def os (name)
|
|
20
|
+
@os = name
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def get_os
|
|
24
|
+
@os
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
data/lib/execute.rb
ADDED
data/lib/lint_plan.rb
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
require 'rules'
|
|
2
|
+
|
|
3
|
+
module XCodeBuildHelper
|
|
4
|
+
class LintPlan
|
|
5
|
+
def report_type(name)
|
|
6
|
+
@report_type = name
|
|
7
|
+
end
|
|
8
|
+
def get_report_type
|
|
9
|
+
@report_type
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def output(name)
|
|
13
|
+
@output = name
|
|
14
|
+
end
|
|
15
|
+
def get_output
|
|
16
|
+
@output
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def ignore(name)
|
|
20
|
+
@ignore = name
|
|
21
|
+
end
|
|
22
|
+
def get_ignore
|
|
23
|
+
@ignore
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def rules(rule = nil, &block)
|
|
27
|
+
if block_given?
|
|
28
|
+
if @rules == nil
|
|
29
|
+
rule = XCodeBuildHelper::Rules.new
|
|
30
|
+
else
|
|
31
|
+
rule = @rules
|
|
32
|
+
end
|
|
33
|
+
rule.instance_eval(&block)
|
|
34
|
+
end
|
|
35
|
+
@rules = rule
|
|
36
|
+
end
|
|
37
|
+
def get_rules
|
|
38
|
+
@rules
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
data/lib/rules.rb
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module XCodeBuildHelper
|
|
2
|
+
class Rules
|
|
3
|
+
def initialize
|
|
4
|
+
@attributes = {}
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
def method_missing(name, *args, &block)
|
|
8
|
+
if name.to_s.start_with? "get_"
|
|
9
|
+
@attributes[name.to_s.gsub(/get_/, '').to_sym]
|
|
10
|
+
elsif name.to_s.start_with? "key_"
|
|
11
|
+
if @attributes[name.to_s.gsub(/key_/, '').to_sym]
|
|
12
|
+
name.to_s.gsub(/key_/, '').upcase
|
|
13
|
+
end
|
|
14
|
+
else
|
|
15
|
+
@attributes[name] = args[0]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def get_attribute_list
|
|
20
|
+
@attributes.keys
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
data/lib/test_plan.rb
ADDED
data/lib/version.rb
ADDED
data/lib/xcode.rb
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
require 'execute'
|
|
2
|
+
require 'device'
|
|
3
|
+
require 'test_plan'
|
|
4
|
+
require 'coverage_plan'
|
|
5
|
+
require 'lint_plan'
|
|
6
|
+
|
|
7
|
+
module XCodeBuildHelper
|
|
8
|
+
class XCode
|
|
9
|
+
def initialize
|
|
10
|
+
@device_registry = {}
|
|
11
|
+
@tp_registry = {}
|
|
12
|
+
@coverage_registry = {}
|
|
13
|
+
@lint_registry = {}
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def workspace(name)
|
|
17
|
+
@workspace = name
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def get_workspace
|
|
21
|
+
@workspace
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def scheme(name)
|
|
25
|
+
@scheme = name
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def get_scheme
|
|
29
|
+
@scheme
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def sdk(name)
|
|
33
|
+
@sdk = name
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def get_sdk
|
|
37
|
+
@sdk
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def config(name)
|
|
41
|
+
@config = name
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def get_config
|
|
45
|
+
@config
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def device(name, device = nil, &block)
|
|
49
|
+
if device == nil
|
|
50
|
+
if @device_registry[name] == nil
|
|
51
|
+
device = XCodeBuildHelper::Device.new
|
|
52
|
+
else
|
|
53
|
+
device = @device_registry[name]
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
if block_given?
|
|
58
|
+
device.instance_eval(&block)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
@device_registry[name] = device
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def get_device(name)
|
|
65
|
+
@device_registry[name]
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def test_plan(name, test_plan = nil, &block)
|
|
69
|
+
if test_plan == nil
|
|
70
|
+
if @tp_registry[name] == nil
|
|
71
|
+
test_plan = XCodeBuildHelper::TestPlan.new
|
|
72
|
+
else
|
|
73
|
+
test_plan = @tp_registry[name]
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if block_given?
|
|
78
|
+
test_plan.instance_eval(&block)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
@tp_registry[name] = test_plan
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def get_test_plan(name)
|
|
85
|
+
@tp_registry[name]
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
def coverage_plan(name, coverage_plan = nil, &block)
|
|
89
|
+
if coverage_plan == nil
|
|
90
|
+
if @coverage_registry[name] == nil
|
|
91
|
+
coverage_plan = XCodeBuildHelper::CoveragePlan.new
|
|
92
|
+
else
|
|
93
|
+
coverage_plan = @coverage_registry[name]
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if block_given?
|
|
98
|
+
coverage_plan.instance_eval(&block)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
@coverage_registry[name] = coverage_plan
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
def get_coverage_plan(name)
|
|
105
|
+
@coverage_registry[name]
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
def lint_plan(name, lint_plan = nil, &block)
|
|
109
|
+
if lint_plan == nil
|
|
110
|
+
if @lint_registry[name] == nil
|
|
111
|
+
lint_plan = XCodeBuildHelper::LintPlan.new
|
|
112
|
+
else
|
|
113
|
+
lint_plan = @lint_registry[name]
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if block_given?
|
|
118
|
+
lint_plan.instance_eval(&block)
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
@lint_registry[name] = lint_plan
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
def get_lint_plan(name)
|
|
125
|
+
@lint_registry[name]
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
end
|