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

Allow abbreviated messages in expect_offense #8286

Closed
marcandre opened this issue Jul 9, 2020 · 1 comment
Closed

Allow abbreviated messages in expect_offense #8286

marcandre opened this issue Jul 9, 2020 · 1 comment

Comments

@marcandre
Copy link
Contributor

Some error messages are quite long and don't really add much to the specs to be in full.

It would be nice to finish an offense line with [...] so it matches.

# before
expect_offense(<<~RUBY)
  source :gemcutter
         ^^^^^^^^^^ The source `:gemcutter` is deprecated because HTTP requests are insecure. Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
RUBY
# after
expect_offense(<<~RUBY)
  source :gemcutter
         ^^^^^^^^^^ The source `:gemcutter` is deprecated [...]
RUBY
@marcandre marcandre added enhancement good first issue Easy task, suitable for newcomers to the project help wanted labels Jul 9, 2020
@marcandre marcandre removed good first issue Easy task, suitable for newcomers to the project help wanted labels Jul 10, 2020
@marcandre
Copy link
Contributor Author

I'll handle it.

marcandre added a commit to marcandre/rubocop that referenced this issue Jul 10, 2020
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