Skip to content

Latest commit

 

History

History
30 lines (18 loc) · 992 Bytes

README.md

File metadata and controls

30 lines (18 loc) · 992 Bytes

docker-swiftlint

A Docker image for running swiftlint.

Variables:

  • SWIFTLINT_REVISION can be any commit or tagged release of SwiftLint
  • SWIFT_VERSION can be any tagged release of the Swift Docker image

Building an image

SWIFTLINT_REVISION="0.25.1" SWIFT_VERSION="4.1" make build

Releasing a swiftlint version

SWIFTLINT_REVISION="0.25.1" SWIFT_VERSION="4.1" make release

To push to an org that is not endocrimes, you can also set ORG_NAME.

Running swiftlint on a folder

docker run --volume /full/path/to/folder:/swiftlint endocrimes/swiftlint:0.25.1 lint

Running swiftlint on stdin

→ echo "let i = 0" | docker run endocrimes/swiftlint:0.25.1 lint --use-stdin

Done linting! Found 1 violation, 0 serious in 1 file.
<nopath>:1: warning: Trailing Newline Violation: Files should have a single trailing newline. (trailing_newline)