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

Fix command should explain what's wrong #58

Closed
jayconrod opened this issue Dec 27, 2017 · 0 comments
Closed

Fix command should explain what's wrong #58

jayconrod opened this issue Dec 27, 2017 · 0 comments

Comments

@jayconrod
Copy link
Contributor

Migrated from bazelbuild/rules_go#792

When a BUILD file needs to be fixed, gazelle fix just emits a warning without explaining what's wrong with it. This could be something as trivial as loaded symbols being out of order.

Our warning should explain what needs to be fixed. We should not emit a warning for trivial problems that won't interfere with later operations (loaded symbol ordering).

jayconrod pushed a commit to jayconrod/bazel-gazelle that referenced this issue Mar 5, 2018
* FixFile and FixLoads now modify a file in place instead of returning
  a new file. This simplifies the implementation of current and future
  transformations, since it avoids the need to copy objects which
  aren't easily copied.
* FixFile is consolidated with FixFileMinor. Risky transformations are
  only performed if c.ShouldFix is true. Warnings are printed
  otherwise.

Fixes bazelbuild#150
Fixes bazelbuild#58
jayconrod added a commit that referenced this issue Mar 7, 2018
* FixFile and FixLoads now modify a file in place instead of returning
  a new file. This simplifies the implementation of current and future
  transformations, since it avoids the need to copy objects which
  aren't easily copied.
* FixFile is consolidated with FixFileMinor. Risky transformations are
  only performed if c.ShouldFix is true. Warnings are printed
  otherwise.

Fixes #150
Fixes #58
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

1 participant