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

Add "--fix" feature #166

Open
caitlinelfring opened this issue Nov 20, 2021 · 0 comments
Open

Add "--fix" feature #166

caitlinelfring opened this issue Nov 20, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@caitlinelfring
Copy link
Member

Most linters have the ability to automatically fix any violations that are found. Some examples:

This feature will also allow woke to take advantage of GitHub suggestions using something like reviewdog/action-suggester

A caveat with this feature is this should be a "best effort" fix and doesn't guarantee that the fixes it makes will produce functioning code as renaming variables/functions/methods/classes can have far-ranging implications and therefore, using this feature shouldn't be done with blind trust.

Features

  • Opt-in only (disabled by default)
  • Uses the first "alternative" for replacement
  • Should be able to write fixes to files as well as write the diff to stdout
    • Something similar to gofmt -w
-w
  Do not print reformatted sources to standard output.
  If a file's formatting is different from gofmt's, overwrite it
  with gofmt's version. If an error occurred during overwriting,
  the original file is restored from an automatic backup.
@caitlinelfring caitlinelfring added the enhancement New feature or request label Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant