Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to uninstall swiftlint from xcode, or to turn its warnings off

Please help me to understand how to uninstal swiftlint, or how to switch it warnings off completely(because it starts to ignore all rules from time to time). I installed swiftilnt from pkg file, and now cannot find a way to remove it. "run from Makefile" solution does not help me, because i don't understand where it is, and how to run it. In Xcode preferences i also can't find a way to uninstall it. Also i search in finder for "swiftlint", and it cannot find it too.

Xcode 8.2.1

like image 632
Stacy Grey Avatar asked Feb 01 '17 18:02

Stacy Grey


1 Answers

Try this :

  1. Go to your Project in the Navigation area (left column, blue icon on the very top)

  2. Select your app target in the Targets line.

  3. Go "Build Phases" tab

  4. In Run Script, delete the command line under "Shell" text field that looks like this: (You can also just comment a line by adding # at the start of it, as mentioned below)

     if which swiftlint >/dev/null; then
     swiftlint
     else
     echo "warning: SwiftLint not installed, download from 
     https://github.com/realm/SwiftLint"
     fi
    
  5. Build Again to check !

This works for me and has the advantage to put it back later very easily. Hope it helps

like image 64
AdPiscinam Avatar answered Nov 14 '22 22:11

AdPiscinam