Adding SwiftLint

step
contrib-this-feature
ios
#1

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

0 Likes

#2

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:

0 Likes

#3

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:

0 Likes

#4

@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 https://github.com/kimdv/bitrise-step-swiftlint#how-to-create-your-own-step 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: {}

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

0 Likes

#5

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

#6

Sure, but rather use the bitrise.yml which was auto generated when you created the step - as described in the generated README: https://github.com/kimdv/bitrise-step-swiftlint#share-your-own-step

0 Likes

#7

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

1 Like

#8

Awesome, thank you @kimdv! :slight_smile:

0 Likes

#9

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

1 Like

#10

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:

0 Likes

closed #11

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

0 Likes