iosxcodexcode-serverswiftlint

How to identify if the error/warning is created with swiftlint rules


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?


Solution

  • 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.