问题
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" */,
to something like this
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?
来源:https://stackoverflow.com/questions/59830330/swiftlint-overriding-project-settings-related-to-spm