Skip to content

swiftlint lint --fix --use-stdin does not print fixed source #6501

Closed

Description

@jansorg

New Issue Checklist

Bug Description

With the example below, cat file.swift | swiftlint lint --fix --use-stdin prints the unfixed content again to STDOUT.
I'm not sure if autocorrections were not applied at all or if only some are applied (but not vertical_whitespace).

// Copyright




func foo(       ) {
    print(   some  )
}
$ cat file.swift | swiftlint lint --fix --use-stdin

Running swiftlint lint --fix file.swift actually corrects the file.

$ swiftlint lint --fix ./file.swift 
Correcting Swift files at paths ./file.swift
Correcting 'file.swift' (1/1)
/home/jansorg/temp/swiftSimple/file.swift: Corrected vertical_whitespace 3 times
Done correcting 1 file!

Fixed content if not using --use-stdin:

// Copyright

func foo(       ) {
    print(   some  )
}

Environment

  • SwiftLint version 0.63.1
  • Xcode version none (Linux)
  • Installation method used Arch package manager
  • Configuration file: none

Activity

  1. added
    bug
    on Feb 19, 2026
  2. self-assigned this
    on Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions