Skip to content

swiftlint opens and closes every file even if excluded (with SPM .build folders causes problems) #6259

Open

Description

@gabriel

New Issue Checklist

$ swiftlint lint .

If using lots of local packages, which include .build directories which include git checkouts, even if excluded, swiftlint opens and closes every file in the directory.

sudo fs_usage -w -f filesystem swiftlint
14:36:22.619133  open              F=8        (R_____N____X__)  .build/arm64-apple-macosx/debug/index/store/v5/records/0Q                                                                               0.000522   swiftlint.4939359
14:36:22.619134  getattrlistbulk                                                                                                                                                                                              0.000002   swiftlint.4939360
14:36:22.619136  close             F=9                                                                                                                                                                                        0.000011   swiftlint.4939395

for every file...

Activity

  1. kapitoshka438 commented on Sep 25, 2025

    @kapitoshka438
    Contributor

    @gabriel have you tried --force-exclude?

  2. gabriel commented on Sep 25, 2025

    @gabriel
    Author

    Yeah I tried force exclude and alternate exclude, and no difference in fs_usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions