code quality added

This commit is contained in:
Grigory Ulanov 2017-06-16 15:27:40 +03:00
parent c34b54084b
commit 6dbc8f6a96
7 changed files with 24 additions and 24 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "code-quality"]
path = code-quality
url = https://github.com/TouchInstinct/code-quality-ios

View File

@ -1,21 +0,0 @@
disabled_rules:
- variable_name
excluded:
- Carthage
- Pods
line_length: 128
type_body_length:
- 500 # warning
- 700 # error
file_length:
warning: 500
error: 1200
warning_threshold: 1
custom_rules:
uiwebview_disabled:
included: ".*.swift"
name: "UIWebView Usage Disabled"
regex: "(UIWebView)"
message: "Do not use UIWebView. Use WKWebView Instead. https://developer.apple.com/reference/uikit/uiwebview"
severity: error

1
.swiftlint.yml Symbolic link
View File

@ -0,0 +1 @@
code-quality/.swiftlint.yml

View File

@ -1,3 +0,0 @@
exclude:
- 'Pods'
- 'Carthage'

1
.tailor.yml Symbolic link
View File

@ -0,0 +1 @@
code-quality/.tailor.yml

View File

@ -96,6 +96,7 @@
0AC0DA3C1EE99233006E2CC9 /* Resources */,
0AA8505A1EF3FB4E00353B55 /* SwiftLint */,
0AA8505B1EF3FBE200353B55 /* Tailor */,
0AA8505F1EF404A800353B55 /* CopyPaste Detection */,
);
buildRules = (
);
@ -182,6 +183,20 @@
shellPath = /bin/sh;
shellScript = "if hash tailor 2>/dev/null; then\ntailor\nfi";
};
0AA8505F1EF404A800353B55 /* CopyPaste Detection */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "CopyPaste Detection";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Running CPD\npmd cpd --files ${EXECUTABLE_NAME} --minimum-tokens 50 --language swift --encoding UTF-8 --format net.sourceforge.pmd.cpd.XMLRenderer > cpd-output.xml --failOnViolation true\n\n# Running script\nphp ./cpd_script.php -cpd-xml cpd-output.xml";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */

1
code-quality Submodule

@ -0,0 +1 @@
Subproject commit e86a6710e58fc4de1da83b014a11b3a31ff95d9f

2
cpd-output.xml Normal file
View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<pmd-cpd/>

1
cpd_script.php Symbolic link
View File

@ -0,0 +1 @@
code-quality/cpd_script.php