Skip to content

Fix RuboCop lint offences#392

Merged
swanson merged 7 commits into
masterfrom
rubocop-lint
Dec 14, 2015
Merged

Fix RuboCop lint offences#392
swanson merged 7 commits into
masterfrom
rubocop-lint

Conversation

@Koronen
Copy link
Copy Markdown
Contributor

@Koronen Koronen commented Dec 8, 2015

There's currently one rule left, Lint/RescueException, that needs more thought.

Ready for review.

@swanson
Copy link
Copy Markdown
Collaborator

swanson commented Dec 8, 2015

Those exceptions could be scope to whatever Feedjira can create; but I'm not aware of a great way to get that list.

@swanson
Copy link
Copy Markdown
Collaborator

swanson commented Dec 8, 2015

👍 thanks for tackling that :)

@Koronen
Copy link
Copy Markdown
Contributor Author

Koronen commented Dec 8, 2015

Thanks for the hint! I'll have a look next time I have a chance to work on this.

@swanson
Copy link
Copy Markdown
Collaborator

swanson commented Dec 8, 2015

Let's merge for now with the inline exceptions -- I can live with those :)

Mostly by prefixing the unused arguments with `_` to indicate they're unused.
This is because the unused arguments are often parts of protocols/interfaces.

Does remove the unused `parser` parameter from `get_feed_for_url`, though.
This is done by rescuing `StandardError` instead of `Exception`, which should
still cover most if not all errors raised by the Curb and Feedjira libraries. We
no longer try to rescue fatal errors, like `NoMemoryError`, which is what
RuboCop was complaining about.

An even better fix for this could be to rescue an even narrower set of errors,
but I'll leave that until the next time.
@Koronen
Copy link
Copy Markdown
Contributor Author

Koronen commented Dec 14, 2015

  • Removed the unused finder parameter in c190d3c

  • Fixed Lint/RescueException in 0ae4144.

    This was done by rescuing StandardError instead of Exception, which should still cover most if not all errors raised by the Curb and Feedjira libraries. We no longer try to rescue fatal errors, like NoMemoryError, which is what RuboCop was complaining about.

    An even better fix for this could be to rescue an even narrower set of errors, but I'll leave that until the next time.

@swanson
Copy link
Copy Markdown
Collaborator

swanson commented Dec 14, 2015

Thanks!

swanson pushed a commit that referenced this pull request Dec 14, 2015
@swanson swanson merged commit 4a26d6d into master Dec 14, 2015
@Koronen Koronen deleted the rubocop-lint branch December 14, 2015 21:24
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.

2 participants