Swiftlint: Specify reporter from the command line

Created on 20 Mar 2017  路  3Comments  路  Source: realm/SwiftLint

I am using swiftlint two different ways:

  1. as an Xcode build phase in a separate target so the developers can lint their code manually
  2. as a step in our CI pipeline that rejects merge requests if the linter had some serious warning.

I created the .swiftlint.yml file in the project root and almost everything works fine. In the first case it would be very convenient to use the xcode reporter so the devs can see the errors and warnings directly in Xcode, in the second case it made more sense to use the html reporter as these reports will be archived as a build artifacts and it is simple more user friendly to have html reports as an output of the CI pipeline. The problem is that I must specify the reporter in the configuration file and I can not differentiate the reporters from the build phases and the CI script.

So it would be wonderful to be able to specify the reporter also from the command line.

question

Most helpful comment

You can do that with swiftlint lint --reporter xcode for example.

All 3 comments

You can do that with swiftlint lint --reporter xcode for example.

Sorry I completely overlooked this option

No worries! Feel free to reopen or open another issue if you have any other questions 馃挴

Was this page helpful?
0 / 5 - 0 ratings

Related issues

larslockefeer picture larslockefeer  路  3Comments

kdawgwilk picture kdawgwilk  路  4Comments

jcarroll-mediafly picture jcarroll-mediafly  路  3Comments

muzamilhassan1987 picture muzamilhassan1987  路  3Comments

zntfdr picture zntfdr  路  3Comments