Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak the auto-correction result console output for clarity #3522

Merged
merged 2 commits into from
Feb 25, 2021

Conversation

mokagio
Copy link
Contributor

@mokagio mokagio commented Feb 16, 2021

Hello dear SwiftLint maintainers 👋

A colleague was confused by the output of swiftlint autocorrect, she couldn't understand why SwiftLint told her it corrected thousands of files when she only touched one.

The Done correcting \(files.count)... output made her think that a change was made on each of the files, when really they had only been inspected.

A good solution would be to adopt a similar approach as the lint command does.

Not being familiar with the codebase, I though a good first step could have been to tweak the message a bit, making it clearer that the count printed to the console is the inspected files.

If the idea resonates and you'd rather implement a more refined solution, feel free to take over the branch or close this PR. I don't have the time to dive in and see if I can get it to work myself right now, but loop me in the conversation and let me know if there's anything you need from me to help.

Thanks for maintaining this great tool 🙇‍♂️

A colleague was confused by the output of `swiftlint autocorrect`, she
couldn't understand why SwiftLint told her it corrected thousands of
files when she only touched one.

The "Done correcting \(files.count) ..." output made her think that a
change was made on each of the `files`, when really they had only been
inspected.

A good solution would be to adopt a similar approach as the `lint`
command does.

Not being familiar with the codebase, I though a good first step could
have been to tweak the message a bit, making it clearer that the count
printed to the console is the inspected files.
@SwiftLintBot
Copy link

SwiftLintBot commented Feb 16, 2021

12 Messages
📖 Linting Aerial with this PR took 2.03s vs 2.04s on master (0% faster)
📖 Linting Alamofire with this PR took 2.88s vs 2.93s on master (1% faster)
📖 Linting Firefox with this PR took 9.81s vs 9.79s on master (0% slower)
📖 Linting Kickstarter with this PR took 15.44s vs 15.55s on master (0% faster)
📖 Linting Moya with this PR took 1.37s vs 1.48s on master (7% faster)
📖 Linting Nimble with this PR took 1.29s vs 1.26s on master (2% slower)
📖 Linting Quick with this PR took 0.6s vs 0.6s on master (0% slower)
📖 Linting Realm with this PR took 4.24s vs 4.2s on master (0% slower)
📖 Linting SourceKitten with this PR took 1.03s vs 1.02s on master (0% slower)
📖 Linting Sourcery with this PR took 8.45s vs 8.5s on master (0% faster)
📖 Linting Swift with this PR took 11.39s vs 11.45s on master (0% faster)
📖 Linting WordPress with this PR took 18.25s vs 18.5s on master (1% faster)

Generated by 🚫 Danger

@jpsim
Copy link
Collaborator

jpsim commented Feb 25, 2021

Sure, thanks for the PR!

@jpsim jpsim merged commit 706abfe into realm:master Feb 25, 2021
@mokagio mokagio deleted the mokagio/clearer-autocorrect-message branch February 26, 2021 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants