0

I have a swift package which I am using in some of my projects. I just added a dev app to my package folder to quickly preview and add some of the swiftUI code in it.

The structure is like so:

Package-root-folder   
..Package.swift,
..Sources, 
..Tests 
..Package.resolved
..devappfolder
....devapp
....devapp.xcodeproj

My dev app imports the package as local package and I am trying to run swiftlint on the package from the dev app as a run script which does not work because it wont lint folders outside of the devappfolder.

Then I tried to add swiftlint as a plugin and dependency in the package.swift file which works but I do not want to include this plugin when I make a release of my package on github to be used in my other projects. I only want to lint this package in devApp.

Any advice how to set this up?

beowulf
  • 546
  • 1
  • 10
  • 16
  • I have the same setup and swiftlint is working fine. Keep in mind that the .swiftlint.yml file has to be inside the devappfolder folder next to devapp.xcodeproj. – Stefan Wieland Mar 30 '23 at 12:29
  • I fixed this by addding `cd ..` to the begging of the runscrip in xcode just after `export PATH="$PATH:/opt/homebrew/bin"` – beowulf Apr 03 '23 at 06:48

0 Answers0