Ios 如何在swiftlint配置文件中禁用字符限制
我正在处理一个项目,我需要知道如何在swiftlint配置文件中禁用字符限制,那么如何禁用字符限制 这是swiftlint文件Ios 如何在swiftlint配置文件中禁用字符限制,ios,swift,swiftlint,Ios,Swift,Swiftlint,我正在处理一个项目,我需要知道如何在swiftlint配置文件中禁用字符限制,那么如何禁用字符限制 这是swiftlint文件 disabled_rules: - force_cast - force_try - variable_name - type_name - file_length - type_body_length - cyclomatic_complexity - function_body_length - valid_docs - tr
disabled_rules:
- force_cast
- force_try
- variable_name
- type_name
- file_length
- type_body_length
- cyclomatic_complexity
- function_body_length
- valid_docs
- trailing_whitespace
opt_in_rules:
- empty_string
excluded:
- Carthage
- Pods
- SwiftLint/Common/3rdPartyLib
line_length:
warning: 150
error: 200
ignores_function_declarations: true
ignores_comments: true
ignores_urls: true
custom_rules:
smiley_face:
name: "Smiley Face"
regex: '( :\))'
match_kinds:
- comment
- string
message: "A closing parenthesis smiley :) creates a half-hearted smile, and thus is not preferred. Use :]"
severity: warning
我想你可以在禁用的规则中添加行长,如果这是你的意思。我想你可以在禁用的规则中添加行长,如果这是你的意思。如果你遇到此警告的问题:
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'by' (identifier_name)
您可以将以下命令添加到配置文件:
variable_name:
max_length:
warning: 45
error: 60
min_length:
warning: 1
我希望这对您有所帮助,并且符合您的问题。如果您遇到此警告的问题:
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'by' (identifier_name)
您可以将以下命令添加到配置文件:
variable_name:
max_length:
warning: 45
error: 60
min_length:
warning: 1
我希望这对您有所帮助,并且符合您的问题。文件长度已经添加,应该可以工作了,需要什么字符限制?实际上是行字符限制,我需要禁用,因为它显示行应该是150个字符或更少。你不是把它增加到一个非常高的限制吗?不,我的维护人员让我禁用行字符限制。你有下面的答案,那么问题是什么?文件长度已经增加了,应该可以工作,需要什么字符限制?实际上行字符限制,我需要禁用,因为它显示行应该是150个字符或更少。你不是把它增加到一个非常高的限制吗?不,我的维护人员让我禁用行字符限制。你有下面的答案,那么问题是什么?是的,我需要禁用行字符限制,正如我所说,您只需删除当前所有与禁用的规则中的line_length和add-line_length相关的内容,我需要禁用line字符限制,正如我所说的,您只需删除当前所有与禁用的规则中的line_length和add-line_length相关的内容