我遇到了 swiftlint 自动更正的奇怪行为。我的项目使用通过 SPM 导入的库。但是当我运行 linter 时,它会更改如下设置
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 */,
它基本上删除了对实际库的所有引用,并用一些通用的东西替换它们。我尝试添加两个不同的库,并且对两个库都做了同样的事情。
知道可能发生了什么以及如何解决吗?