-
-
Save hectorddmx/49293f7e5720070c248a771730764747 to your computer and use it in GitHub Desktop.
Revisions
-
hectorddmx revised this gist
Sep 14, 2018 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -50,6 +50,7 @@ oclint-json-compilation-database -e Janrain -- -max-priority-1=100000 -max-prior -disable-rule=HighNcssMethod \ -disable-rule=HighNPathComplexity \ -disable-rule=LongMethod \ -disable-rule=LongClass \ -disable-rule=HighCyclomaticComplexity \ -disable-rule=TooManyMethods \ -disable-rule=DeepNestedBlock \ -
hectorddmx revised this gist
Sep 14, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,7 +28,7 @@ fi rm -f compile_commands.json # Build and analyze # OCLint Rule Index: https://oclint-docs.readthedocs.io/en/v0.13/rules/index.html echo "Starting clean and build..." xcodebuild -project "${WORKSPACE}" -scheme "${SCHEME}" -configuration Bot \ -
hectorddmx revised this gist
Sep 14, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # OCLint (0.13) integration with Xcode ## 1. Integration * Add a new ***Target*** of kind ***Aggregate***, name it ***OCLint*** -
hectorddmx revised this gist
Sep 14, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,4 +13,4 @@ ## 3. Customization * Rules can be ignored by adding the parameter `-disable-rule=<RuleName>` to the `oclint-json-compilation-database` command * A comprehensive list of rules can be found at [OCLint documentation](https://oclint-docs.readthedocs.io/en/v0.13/rules/index.html) -
hectorddmx revised this gist
Sep 14, 2018 . 1 changed file with 38 additions and 23 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,46 +1,61 @@ # Original script at # https://gist.github.com/guilhermearaujo/a6e4dbb982fea40a0513 ##source ~/.bash_profile export PATH=$PATH:/usr/local/bin/ if [ -z "${SCHEME+x}" ] then export SCHEME="${PROJECT_NAME}" fi # "Workspace" is actually the project if [ -z "${WORKSPACE+x}" ] then export WORKSPACE="${PROJECT_NAME}.xcodeproj" fi cd "${SOURCE_ROOT}" # Check if oclint is installed if ! which -s oclint-json-compilation-database then echo 'error: OCLint not installed, install e.g. with homebrew cask' exit 2 fi # Cleanup before building rm -f compile_commands.json # Build and analyze # OCLint Rule Index: http://docs.oclint.org/en/dev/rules/index.html echo "Starting clean and build..." xcodebuild -project "${WORKSPACE}" -scheme "${SCHEME}" -configuration Bot \ clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO > xcodebuild.log echo "Finished clean and build project." oclint-xcodebuild | xcpretty -r json-compilation-database echo "Built json compilation database at ./compile-commands.json" # AssignIvarOutsideAccessors is for version 0.13 # IvarAssignmentOutsideAccessorsOrInit is for 0.10.3 only oclint-json-compilation-database -e Janrain -- -max-priority-1=100000 -max-priority-2=100000 -max-priority-3=100000 \ -disable-rule=InvertedLogic \ -disable-rule=UnusedMethodParameter \ -disable-rule=LongLine \ -disable-rule=LongVariableName \ -disable-rule=ShortVariableName \ -disable-rule=UselessParentheses \ -disable-rule=HighNcssMethod \ -disable-rule=HighNPathComplexity \ -disable-rule=LongMethod \ -disable-rule=HighCyclomaticComplexity \ -disable-rule=TooManyMethods \ -disable-rule=DeepNestedBlock \ -disable-rule=AssignIvarOutsideAccessors \ -disable-rule=IvarAssignmentOutsideAccessorsOrInit | sed 's/\(.*\.\m\{1,2\}:[0-9]*:[0-9]*:\)/\1 warning:/' # Final cleanup rm -f compile_commands.json rm -f xcodebuild.log -
guilhermearaujo revised this gist
Apr 11, 2015 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,17 @@ source ~/.bash_profile export PATH=$PATH:/usr/local/bin/ if [ -z "${SCHEME+x}" ] then export SCHEME="${PROJECT_NAME}" fi if [ -z "${WORKSPACE+x}" ] then export WORKSPACE="${PROJECT_NAME}.xcworkspace" fi cd "${SOURCE_ROOT}" # Check if xctool and oclint are installed if ! which -s xctool @@ -28,11 +28,11 @@ fi # Cleanup before building rm -f compile_commands.json xctool -workspace "${WORKSPACE}" -scheme "${SCHEME}" clean > /dev/null # Build and analyze # OCLint Rule Index: http://docs.oclint.org/en/dev/rules/index.html xctool -workspace "${WORKSPACE}" -scheme "${SCHEME}" -reporter json-compilation-database:compile_commands.json build oclint-json-compilation-database -e Pods -- -max-priority-1=100000 -max-priority-2=100000 -max-priority-3=100000 \ -disable-rule=InvertedLogic \ -disable-rule=UnusedMethodParameter \ -
guilhermearaujo created this gist
Mar 12, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ # OCLint integration with Xcode ## 1. Integration * Add a new ***Target*** of kind ***Aggregate***, name it ***OCLint*** * Under *Builde Phases*, add a new ***Run Script Phase*** * Paste the script ## 2. Usage * Select target ***OCLint*** * Build the target (press <kbd>⌘</kbd>+<kbd>B</kbd>) * Wait for the script to run * Warnings will appear in the *Issue Navigator* (press <kbd>⌘</kbd>+<kbd>4</kbd>) ## 3. Customization * Rules can be ignored by adding the parameter `-disable-rule=<RuleName>` to the `oclint-json-compilation-database` command * A comprehensive list of rules can be found at [OCLint documentation](http://docs.oclint.org/en/dev/rules/index.html) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,46 @@ source ~/.bash_profile export PATH=$PATH:/usr/local/bin/ if [ -z ${SCHEME+x} ] then export SCHEME=${PROJECT_NAME} fi if [ -z ${WORKSPACE+x} ] then export WORKSPACE=${PROJECT_NAME}.xcworkspace fi cd ${SOURCE_ROOT} # Check if xctool and oclint are installed if ! which -s xctool then echo 'error: xctool not found, install e.g. with homebrew' exit 1 fi if ! which -s oclint-json-compilation-database then echo 'error: OCLint not installed, install e.g. with homebrew cask' exit 2 fi # Cleanup before building rm -f compile_commands.json xctool -workspace ${WORKSPACE} -scheme ${SCHEME} clean > /dev/null # Build and analyze # OCLint Rule Index: http://docs.oclint.org/en/dev/rules/index.html xctool -workspace ${WORKSPACE} -scheme ${SCHEME} -reporter json-compilation-database:compile_commands.json build oclint-json-compilation-database -e Pods -- -max-priority-1=100000 -max-priority-2=100000 -max-priority-3=100000 \ -disable-rule=InvertedLogic \ -disable-rule=UnusedMethodParameter \ -disable-rule=LongLine \ -disable-rule=LongVariableName \ -disable-rule=ShortVariableName \ -disable-rule=UselessParentheses \ -disable-rule=IvarAssignmentOutsideAccessorsOrInit | sed 's/\(.*\.\m\{1,2\}:[0-9]*:[0-9]*:\)/\1 warning:/' # Final cleanup rm -f compile_commands.json