Closed Nikoloutsos closed 4 months ago
After some investigation I found the culprit behind this. It's the Package.swift. After muter creates a copy of my SPM it messes up with Package.swift More specifically it creates the following:
// swiftformat:disable all
// swiftlint:disable all
import Foundation
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "Analytics",
...
while I think the // swift-tools-version: 5.9
should have been used as first comment as stated in swift docs
Therefore I fixed it by adding the Package.swift in the excluded files 🚀 Should we exclude Package.swift files by default though? Or should we make a special handling there so that the swiftlint comments comes after? Or at least provide a more meaningful error message so that the developer understands what caused the issue?
What do you think?
I think it makes sense to exclude Package.swift!
@ZevEisenberg I am interested in contributing. So are we okay to make a PR that will exclude it by default?
If @rakaramos is ok with it then I am too. Maybe make it a default part of the config file in case the user wants to modify it? But I can't think of a case where we'd want to mutate Package.swift, so just ignoring it internally would probably be ok too.
@rakaramos follow up message. Are you okay with that?
hi @Nikoloutsos sure thing, go ahead! Thanks for this!
@Nikoloutsos closing it as it was already fixed in #258
Hello decided to give this testing technique a shot in my project and I got the following error. If anyone has any idea how to debug/solve it would be awesome 🙏
Error log:
Reproduction
muter init
and modified the yml into the following:muter run --operators "ChangeLogicalConnector"
and it fails.Versions
MacOS: Sonoma 14.0 Xcode: 15.0.1 Muter: 16