1

I am working on CI/CD setup for my xcode project. For code analysis i am using swiftlint. It is working fine and i am able to see all the errors and warnings in my xcode along with the description. I have also written the run script such that swiftlint only shows the errors and warnings during code analysis and not during build/run.

My issue is, after i integrate the bot with my Xcode server i am not able to identify whether the errors/warnings are generated due to swiftlint rules or by xcode.

Is it possible to identify if the error is due to swiftlint and not generated by xcode itself?

Vidhya Sri
  • 1,773
  • 1
  • 17
  • 46

1 Answers1

1

It's easy. [The blue part below is NOT from swiftlint, and the rest below it IS.]

XCode Image

It says "Shell Script Invocation Warning"

At the end of the message it gives you the rule that has been triggered inside parentheses

(function_body_length)

I just look for the messages ending in parens.

Mozahler
  • 4,958
  • 6
  • 36
  • 56
  • 1
    To add some clarity to this totally correct answer, if you look at your project's build phases where you added Swiftlint, you have a compile phase ("Swift Compiler Warning") and your Swiftlint phase, which is a Shell Script. That's how the warnings are split up. – Connor Neville Jun 07 '17 at 12:08
  • @Mozahler Thank you so much. That was simple. I hope we will get this kind of segregation in Xcode Server issues api also – Vidhya Sri Jun 07 '17 at 13:14