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

Provide an option to look at linting errors without doing any rewrites #956

Open
Prithvirajbilla opened this issue Mar 19, 2019 · 2 comments

Comments

@Prithvirajbilla
Copy link

Problem

When writing linting rules which can possibly do a autofix/rewrite, it would be nice to have an option to run all linting rules to see what the errors were without doing a rewrite. And then run scalafix again to rewrite the linting errors which have an autofix.

For e.g: Let's say I want to write a linter rule which enforces javaconverters over java conversions. It would be good if it let the dev know other helpful information in linting message and an option to autofix it. currently we either do a check (--check flag) which prints patch to terminal (not pleasant) or automatic rewrite (with out --check flag)

Proposal

Add an option --dry-run (name upfor debate), which prints out only Patch.Lint messages to terminal without doing any rewrites and Optionally, letting users know there is a possibility of fixing few linting errors.

@Prithvirajbilla
Copy link
Author

other naming options for --dry-run could be --lint. but like the --dry-run better

@bjaglin
Copy link
Collaborator

bjaglin commented Jun 30, 2023

#1737 kind of addresses this, not from an end-user perspective, but from a client one

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

No branches or pull requests

2 participants