问题标签 [swiftlint]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
swift - Dangerfile Swift 给出文件名
我目前正在将 Danger 集成到 BuddyBuild 中,以便它为我运行预构建和构建后。
我有两个不同的 Dangerfiles 我想使用。
Buddybuild 用于集成 Danger 的网站说要运行这一行:
bundle exec danger --fail-on-errors=true
有没有办法传入一个给它文件名的参数?从我正在阅读的内容来看,这基本上只会找到调用的文件Dangerfile
并使用它来运行危险,但我想要两个不同的文件,即Dangerfile-prebuild
和Dangerfile-postbuild
谢谢!
swift - Adding SwiftLint as a Dependency to a Podspec Project
I'm fairly new to Cocoapods, and I'm hoping this is a question easily answered by 'RTFM', but the 'M' provided by Cocoapods doesn't seem to answer my question.
I'm applying SwiftLint to my projects.
I can easily add it to my projects that include other pods (simply add "pod 'SwiftLint', '~> 0.24'"), but I'm having difficulty adding it to my Cocoapod project.
Like I said, I'm really just a couple of weeks into Cocoapods, and know there's a ways down this rabbit-hole. This project is also a conversion from a previous structure, so it wasn't a 1-to-1 conversion to the Cocoapods structure.
The problem is that I need to be able to add SwiftLint to the BMLTiOSLib project in the same way that I do in the projects that incorporate BMLTiOSLib. This is something that I'd run at build time for BMLTiOSLib.
When I write up a podfile for SwiftLint, I get a number of collisions, and, quite frankly, I don't know enough about the inner workings of Cocoapods to properly diagnose them.
Is there a fairly basic guide to including things like SwiftLint into a Cocoapod project?
swift - Swiftlint 自动更正不会修改文件
在运行swiftlint
版本 0.24.0 时,会报告错误。运行autocorrect
状态表明文件已被更正。然而,作为后续的swiftlint
证明,没有进行任何修改。
请参阅 lint 和更正两个文件的尝试Player.swift
和Prize.swift
.
这是另一次运行,但这次Prize.swift
只有一个文件包含一个可纠正的违规行为。同样,autocorrect
不修改:
请注意,文件的存在与否.swiftlint.yml
对此零影响。
缩写 - 即仅显示相关规则 - 输出swiftlint rules
如下所示。请注意,这三种违规行为colon
是绝对可以纠正的。
关于如何成功运行的任何想法swiftlint autocorrect
?我可能缺少一些明显的配置或参数吗?我咨询了https://github.com/realm/SwiftLint无济于事。
ios - 什么是 extension_access_modifier swiftlint?
我将 Swiftlint 添加到一个项目中,但我无法理解警告的含义extension_access_modifier
。我主要在一个声明为 public 的类上看到它,但是在整个代码库中散布着一些扩展来添加功能。
每当有extension Foo
另一个班级时,我都会在扩展名上收到警告。有人会解释它是什么吗?
swift - 如何修复“行长违规:行应为 120 个字符或更少” - SwiftLint
如何解决线路长度违规?
由于行长度违规而不允许的警报消息的相关部分: message: NSLocalizedString("\nYou will be requested to Use %@ to Sign In. %@ doesn't share any information about you. The permission is required to post your Live Video.",
⚠ 行应为 120 个字符或更少:当前为 208 个字符 (line_length)
swift - SwiftLint 返回空格违规
我在上面的几行中不断收到“返回空格违规”,我该如何解决?
swift - 使用 swiftlint 强制执行独特的编码指南
我想在 swift 项目中执行以下编码指南
- 所有字符串都应放在字符串文件中。
- 我们不应该在故事板、xib 或类中硬编码或存储任何字符串。
是否可以将 swiftlint 用于上述 2 条规则?