peripheryapp / periphery

A tool to identify unused code in Swift projects.
MIT License
5.26k stars 193 forks source link

Implement SwiftLint in Continuous Integration - Discussion #803

Closed mildm8nnered closed 2 months ago

mildm8nnered commented 2 months ago

Opening this as a place to hang discussion.

Makefile entry should be easy enough, perhaps

swiftlint:
        swiftlint --quiet

but SwiftLint will exit with 0 on any successful run, whether violations are detected or not, so possibly we'll want a wrapper script with an exit value

There's also the question of how SwiftLint should be installed/assumptions about paths on the CI machines. For example, homebrew installs SwiftLint at /opt/homebrew/bin/swiftlint, which may (or may not) be on the CI user's path.

See for example, https://github.com/realm/SwiftLint#installation

ileitch commented 2 months ago

Implemented in https://github.com/peripheryapp/periphery/pull/806 using mise.