首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >当使用快速皮棉时,不排除豆荚

当使用快速皮棉时,不排除豆荚
EN

Stack Overflow用户
提问于 2018-12-28 18:27:50
回答 1查看 819关注 0票数 0

我已经添加了swiftLint到我的项目,也添加了.swiftlint.yml文件与所有规则,但一些规则的文件不工作在我的项目中,如排除和行长。我想从Linting中排除pod,所以我在.swiftlint.yml文件中添加了以下代码

包含. - Carthage - Podsexcluded: # paths to ignore during linting. Takes precedence over

在我的.yml文件中,但是pods仍然没有被忽略。

任何人都知道我哪里做错了。

提前感谢

EN

回答 1

Stack Overflow用户

发布于 2018-12-28 19:06:05

例如,您的.yml文件应如下所示,它包含opt_in_rulesdisabled_rulesfile_lengthtype_body_lengthidentifier_nameline_lengthnumber_separatorfunction_parameter_count规则,

代码语言:javascript
复制
excluded:
  - Carthage
  - Pods
opt_in_rules:
  - force_unwrapping
  - empty_count
  - explicit_init
  - closure_spacing
  - overridden_super_call
  - redundant_nil_coalescing
  - nimble_operator
  - attributes
  - operator_usage_whitespace
  - closure_end_indentation
  - first_where
  - object_literal
  - number_separator
  - prohibited_super_call
  - fatal_error_message
disabled_rules:
  - type_name
  - trailing_whitespace
  - identifier_name
  - class_delegate_protocol
  - nesting
file_length:
  warning: 1000
  error: 1200
type_body_length:
 - 200 # warning
 - 300 # error
identifier_name:
  excluded:
    - id
line_length: 300
number_separator:
  minimum_length: 5
function_parameter_count:
  warning: 6
  error: 9

希望能有所帮助。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53957037

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档