Adding SwiftLint

Description of the feature request

A nice feature would be if Swiftlint could be added.

Use case / for what or how I would use it

A use case could be, that before build Swiftlint runs trough everything, and if there is any errors (of warnings) the build will fail

This will add extra quality to the codebase

Thanks for the #feature-request @kimdv!


Just a note: this can be created by anyone (#contrib-this-feature ), so if someone has the time feel free to go ahead and create a step for it (http://devcenter.bitrise.io/bitrise-cli/create-your-own-step/). If you’d have any questions just let us know! :wink:

Hi @viktorbenei!

I jumped in, and tried to make my first feature!
If you have time, I would like some feedback before adding it to the list of integrations. :slight_smile:

@kimdv looks great so far! Not sure if you want to add any other feature to the step, right now it will install swiftlint and run it in the current directory - maybe an input for where swiftlint lint should be run would be useful? Just an idea :slight_smile:

Dev note: as described at GitHub - kimdv/bitrise-step-swiftlint you can now use this step both on your Mac and on bitrise.io, without even sharing it. On your Mac you can use the path::/path/to/step form, and the git:: one works everywhere even on bitrise.io - example:

workflows:
  primary:
    steps:
    - activate-ssh-key@3.1.1:
        run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
    - git-clone@3.5.1: {}
    - git::https://github.com/kimdv/bitrise-step-swiftlint.git: {}

Screenshot from 2017-09-08 11-46-45

P.S.: you can run the workflow editor on your Mac too, with: bitrise :workflow-editor (Workflow Editor "v2" (Open Source & Offline Workflow Editor))

Thanks for the feedback @viktorbenei!
There is still a lot of work to do, sure thing!
I should only run in the project folder. I will see if I can make that for a version 0.2.0 :slight_smile:

I think it should be available for all users, because it is a common used tool among Swift developers. :smile:
Can I use the bitrise :share ?

1 Like

Sure, but rather use the bitrise.yml which was auto generated when you created the step - as described in the generated README: GitHub - kimdv/bitrise-step-swiftlint

I have followed the steps and made a pull request to add the Step :rocket:

1 Like

Awesome, thank you @kimdv! :slight_smile:

I say thank you for the great support and awesome CI & CD! :smiley:

1 Like

Thanks @kimdv, and thank you for the step of course! :wink:

I’ll mark this #feature-request as solved as the step is now available :slight_smile:

This topic was automatically closed after 6 days. New replies are no longer allowed.