OSDN Git Service

swiftflintを導入
authormasakih <masakih@users.sourceforge.jp>
Sun, 12 Mar 2017 11:45:18 +0000 (20:45 +0900)
committermasakih <masakih@users.sourceforge.jp>
Sun, 12 Mar 2017 11:45:18 +0000 (20:45 +0900)
.swiftlint.yml [new file with mode: 0644]
KCD.xcodeproj/project.pbxproj

diff --git a/.swiftlint.yml b/.swiftlint.yml
new file mode 100644 (file)
index 0000000..8cdd7dd
--- /dev/null
@@ -0,0 +1,72 @@
+
+disabled_rules:
+    - variable_name
+    - closing_brace
+    - colon
+    - comma
+    - control_statement
+    - shorthand_operator
+    - force_cast
+    - force_try
+    - leading_whitespace
+    - vertical_whitespace
+    - unused_closure_parameter
+    - legacy_constructor
+    - cyclomatic_complexity
+    - legacy_nsgeometry_functions
+    - class_delegate_protocol
+    - weak_delegate
+    - redundant_optional_initialization
+    - large_tuple
+    - syntactic_sugar
+    - trailing_comma
+    - empty_parentheses_with_trailing_closure
+    - function_parameter_count
+    - nesting
+    - opening_brace
+    - operator_whitespace
+    - return_arrow_whitespace
+    - statement_position
+    - todo
+    - trailing_newline
+    - trailing_semicolon
+    - trailing_whitespace
+    - valid_docs
+
+
+
+file_length:
+    warning: 500
+
+line_length: 500
+
+variable_name:
+  max_length:
+    warning: 100
+    error: 200
+  min_length:
+    warning: 1
+    error: 2
+
+type_name:
+  max_length:
+    warning: 55
+    error: 60
+  min_length:
+    error: 3
+
+type_body_length:
+    warning: 300
+    error: 900
+
+function_body_length:
+    warning: 100
+    error: 1000
+
+function_parameter_count:
+    warning: 6
+    error: 8
+
+cyclomatic_complexity:
+    warning: 20
+    error: 20
index 171f7cf..c1024e0 100644 (file)
                                F4BDEB3F187252F30069D0CE /* Sources */,
                                F4BDEB40187252F30069D0CE /* Frameworks */,
                                F4BDEB41187252F30069D0CE /* Resources */,
+                               F4EA96E71E75464A00515C6C /* ShellScript */,
                        );
                        buildRules = (
                        );
                };
 /* End PBXResourcesBuildPhase section */
 
+/* Begin PBXShellScriptBuildPhase section */
+               F4EA96E71E75464A00515C6C /* ShellScript */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 12;
+                       files = (
+                       );
+                       inputPaths = (
+                       );
+                       outputPaths = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
+                       showEnvVarsInLog = 0;
+               };
+/* End PBXShellScriptBuildPhase section */
+
 /* Begin PBXSourcesBuildPhase section */
                F4BDEB3F187252F30069D0CE /* Sources */ = {
                        isa = PBXSourcesBuildPhase;