问题描述
我在使用 swiftlint 自动更正时遇到了一个奇怪的行为.我的项目使用通过 SPM 导入的库.但是当我运行 linter 时,它会更改如下设置
I am running into a strange behavior with swiftlint autocorrect. My project uses a library imported through SPM. But when I run the linter, it changes settings like the following
B4621A7323D0A90F00545ADE /* LibraryName in Frameworks */ = {isa = PBXBuildFile; productRef = B4621A7223D0A90F00545ADE /* LibraryName */; };
files = (
B4621A7323D0A90F00545ADE /* LibraryName in Frameworks */,
packageProductDependencies = (
B4621A7223D0A90F00545ADE /* LibraryName */,
packageReferences = (
B4621A7123D0A90F00545ADE /* XCRemoteSwiftPackageReference "library-name" */,
像这样
B4621A7323D0A90F00545ADE /* BuildFile in Frameworks */ = {isa = PBXBuildFile; productRef = B4621A7223D0A90F00545ADE /* SwiftPackageProductDependency */; };
files = (
B4621A7323D0A90F00545ADE /* BuildFile in Frameworks */,
packageProductDependencies = (
B4621A7223D0A90F00545ADE /* SwiftPackageProductDependency */,
packageReferences = (
B4621A7123D0A90F00545ADE /* RemoteSwiftPackageReference */,
它基本上删除了对实际库的所有引用,并用一些通用的东西替换它们.我尝试添加两个不同的库,并且对这两个库都做了同样的事情.
It basically removes all references to the actual library and replaces them with some generic things. I tried adding two different libraries and it did the same to both libraries.
知道可能发生了什么以及我该如何解决吗?
Any idea what might be going on and how I can fix it?
推荐答案
这与 SwiftLint 自动更正或其他评论中所述的任何 fastlane 插件无关.据我所知,目前,这是一个 Xcode 错误.
This is not related to SwiftLint autocorrect nor any fastlane plugin as stated in other comments. As far as I can tell, for now, this is an Xcode bug.
这篇关于Swiftlint 覆盖与 SPM 相关的项目设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!