-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add rewrite option #2
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
Conversation
Can you add a real PR description? |
@ldez done |
When a PR is not ready:
When a PR is open, a review can start, each commit after the opening of the PR requires another review. Fixing a typo or adding a comment is not a problem but 2600dff is not expected 2 hours after the opening of the PR. |
sorry, it's ready to be reviewed now. |
|
golangci/golangci-lint#3171
this PR add a
func RunRewrite(filename string, needSimplify bool, rewrite string) ([]byte, error)
to supportgofmt
's-r
flag.The caller from
golangci-lint
will use newly added methodRunRewrite
to apply a option rewrite rule.empty string as
rewrite
will be ignored.private methods are added because origin impl has
os.Exit(...)