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

ruleguard: ignore match expr width limit for suggestions #63

Merged

Conversation

quasilyte
Copy link
Owner

It does make sense to truncate output when printing the
suggestions to the stdout. It's bad if we try to apply
the truncated suggestions to a file though, it leads
to a broken syntax with meta variables inserted instead
of the actual replacements.

  1. For the command-line output, increase the width limit to 60 (instead of 40).
  2. When applying -fix suggestions, ignore the width limit.

Fixes #57

Signed-off-by: Iskander Sharipov quasilyte@gmail.com

It does make sense to truncate output when printing the
suggestions to the stdout. It's bad if we try to apply
the truncated suggestions to a file though, it leads
to a broken syntax with meta variables inserted instead
of the actual replacements.

1. For the command-line output, increase the width limit to 60 (instead of 40).
2. When applying -fix suggestions, ignore the width limit.

Fixes #57

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
@quasilyte quasilyte merged commit 9b42274 into master Jul 19, 2020
@quasilyte quasilyte deleted the quasilyte/fix/ignore_width_limit_in_suggestions/57 branch July 19, 2020 13:58
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.

Flaky results: Same rule produces different results (Root cause: regexp not getting parsed)
2 participants