This commit is contained in:
2019-07-15 22:10:42 +03:00
parent 2d1b3a388d
commit 09faa7a256
5 changed files with 157 additions and 33 deletions
+90
View File
@@ -0,0 +1,90 @@
# Отключаемые условия
disabled_rules:
- trailing_whitespace # Табы на пустых строках
- comma # Перед запятыми и после возможны пробелы - у нас так оформляются все if
- vertical_whitespace # Пустые строки, больше одной. Ввел свое правило - больше 3х
- fallthrough # Разрешить fallthrough в switch
force_unwrapping: warning
# Настройка длины строк в файле
line_length:
warning: 450
error: 650
ignores_function_declarations: true
ignores_comments: true
file_length:
warning: 800
error: 1000
type_body_length:
- 400 # warning
- 600 # error
function_body_length:
warning: 40
error: 200
identifier_name:
min_length:
warning: 2
max_length:
warning: 50
error: 60
excluded:
- f
- a
- b
- x
- y
- i
- j
- k
- v
- l
- r
large_tuple:
- 4 #warning
- 6 #error
nesting:
type_level:
warning: 2 #Поднял количество вложений, что бы не было ложных срабатываний на вложенные структуры и энамы (по-умолчанию допустимо только однократное вложение).
#Секция, которую надо пересмотреть после переезда на Swift.
type_name:
allowed_symbols: _ # Иначе будет ругаться на _ObjC* обертки, правило type_name не позволяет прикрутить исключения регулярным выражением
max_length: 50
cyclomatic_complexity:
ignores_case_statements: true
function_parameter_count:
- 6
#Конец секции.
custom_rules:
whitespace_limits:
name: "Empty lines"
message: "Please do not use more then 2 empty lines"
regex: '((?:\s*\n){4,})'
unnecessary_leading_void_in:
name: "Unnecessary -> Void in at the end of the line"
regex: "(-> (Void|()) in$)"
message: "Unnecessary '-> Void in' at the end of the line. Use only 'in'"
severity: warning
unnecessary_type:
name: "Unnecessary Type"
regex: '(?sm)[ \ta-zA-Z0-9]?(?:let|var){1} [ \ta-zA-Z0-9]+?:[ \t]+?([a-zA-Z0-9]+?)[\t ]+?=[\t ]?\1'
message: "Type Definition Not Needed"
severity: warning
invalid_mark_format:
name: "Invalid MARK Format"
regex: '(?m-s)(\/\/[\s]*?MARK(?!(\:([\s]{1}\-[\s]{1}){0,1}){1}))'
message: "Use format: MARK: - Your Info"
severity: warning
+27
View File
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>ad-hoc</string>
<key>teamID</key>
<string>TKBQ39JHSY</string>
<key>provisioningProfiles</key>
<dict>
<key>media.uma.example</key>
<string>UMA Media AD-HOC</string>
</dict>
<key>signingCertificate</key>
<string>iPhone Distribution: NATSIONALNY SPORTIVNY TELEKANAL OOO (TKBQ39JHSY)</string>
<key>signingStyle</key>
<string>manual</string>
<key>uploadBitcode</key>
<false/>
</dict>
</plist>
View File
-33
View File
@@ -1,33 +0,0 @@
//
// LemuriaTests.swift
// LemuriaTests
//
// Created by Jura on 6/23/19.
// Copyright © 2019 Juraldinio. All rights reserved.
//
import XCTest
class LemuriaTests: XCTestCase {
override func setUp() {
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measure {
// Put the code you want to measure the time of here.
}
}
}
+40
View File
@@ -0,0 +1,40 @@
name: Lemuria
targets:
Lemuria:
type: application
templates: [Shared]
sources:
- path: Lemuria
buildPhase: sources
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: "ru.lemuria"
INFOPLIST_FILE: "./Info.plist"
LemuriaTests:
type: bundle.unit-test
platform: iOS
sources:
- path: LemuriaTests
buildPhase: sources
dependencies:
- target: Lemuria
targetTemplates:
Shared:
deploymentTarget: "10.0"
platform: iOS
settings:
base:
TARGETED_DEVICE_FAMILY: [1, 2]
configs:
debug:
ENABLE_SWIFTLINT: YES
release:
ENABLE_SWIFTLINT: NO
postBuildScripts:
- script: |
if [ "$ENABLE_SWIFTLINT" == YES ] && which swiftlint >/dev/null ; then
swiftlint lint --config "${PROJECT_DIR}"/../../Configs/.swiftlint.yml
fi
name: "SwiftLint"