norio-nomura / action-swiftlint

GitHub Action for SwiftLint
MIT License
370 stars 58 forks source link

Swiftlint and .swiftlint.yml in submodule #40

Open pgawlowski opened 3 years ago

pgawlowski commented 3 years ago

We are using config like below:

name: Swift

on:
  pull_request:
    types:
      - opened
      - edited
      - reopened
      - synchronize

jobs:
  swiftlint:
    name: Swiftlint
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          ssh-key: ${{ secrets.SSH_KEY }}
          submodules: recursive
      - name: Swiftlint
        uses: norio-nomura/action-swiftlint@3.2.1
        with:
          # https://github.com/realm/SwiftLint
          args: --strict --force-exclude
.swiftlint.yml file is excluding:

excluded:
  - Pods
  - SourcePackages
  - fastlane/SnapshotHelper.swift //This one is new!

Locally everything works fine. Our .swiftlint.yml file is in submodule. Checkout is fetching submodules correctly. I've verified commit and it is correct one. Right after checkout we are performing step named Swiftlint and we are constantly getting errors on excluded file fastlane/SnapshotHelper.swift. It seems like despite the fact that submodule fetching is successfull it is still using older (cached?) version of .swiftlint.yml from previous submodule commit.

Currently we are running out of ideas.