Skip to content

Fix: code quality issues#3259

Merged
ashie merged 6 commits into
fluent:masterfrom
withshubh:master
Mar 8, 2021
Merged

Fix: code quality issues#3259
ashie merged 6 commits into
fluent:masterfrom
withshubh:master

Conversation

@withshubh

Copy link
Copy Markdown
Contributor

Description

This PR fixes a few issues that were affecting the code quality.

Summary of changes

  • Prefer rescuing StandardError over Exception
  • Replace and/or with &&/||
  • Fixes ambiguous operators in method arguments
  • Remove ambiguous regular expression literals in method invocations
  • Remove redundant and unnecessary require statement

@withshubh withshubh marked this pull request as draft February 18, 2021 17:48
Signed-off-by: shubhendra <withshubh@gmail.com>
Signed-off-by: shubhendra <withshubh@gmail.com>
Signed-off-by: shubhendra <withshubh@gmail.com>
Signed-off-by: shubhendra <withshubh@gmail.com>
Signed-off-by: shubhendra <withshubh@gmail.com>
@ashie

ashie commented Mar 2, 2021

Copy link
Copy Markdown
Member
  • Prefer rescuing StandardError over Exception

I think it should be a separated PR because it may change the behavior.

@withshubh withshubh marked this pull request as ready for review March 3, 2021 10:01
@withshubh

Copy link
Copy Markdown
Contributor Author
  • Prefer rescuing StandardError over Exception

I think it should be a separated PR because it may change the behavior.

Shall I revert this fix and submit a new PR for the same?

@ashie

ashie commented Mar 4, 2021

Copy link
Copy Markdown
Member
  • Prefer rescuing StandardError over Exception

I think it should be a separated PR because it may change the behavior.

Shall I revert this fix and submit a new PR for the same?

Please remove this commit and force push.
I'll never accept this change because it may break availability.
For example it can't rescue SyntaxError.

Signed-off-by: shubhendra <withshubh@gmail.com>
@withshubh

Copy link
Copy Markdown
Contributor Author
  • Prefer rescuing StandardError over Exception

I think it should be a separated PR because it may change the behavior.

Shall I revert this fix and submit a new PR for the same?

Please remove this commit and force push.
I'll never accept this change because it may break availability.
For example it can't rescue SyntaxError.

Reverted ✨ @ashie

@ashie

ashie commented Mar 8, 2021

Copy link
Copy Markdown
Member

Thanks! Other changes seem reasonable, I'll merge it.

@ashie ashie merged commit 4cd2be4 into fluent:master Mar 8, 2021
@withshubh

Copy link
Copy Markdown
Contributor Author

Hi @ashie 👋
I ran DeepSource analysis on my fork of this repository to detect these issues. Have a look at the issues caught in this repository by DeepSource here.

DeepSource is a code review automation tool that detects code quality issues and helps you to automatically fix some of them. You can use DeepSource to track test coverage, Detect problems in Dockerfiles, etc. in addition to detecting issues in code.

Can I submit a new PR with the configuration file which I used to configure the analysis?
You can merge the configuration file to continuously analyze the repo and fix code quality issues.

@ashie

ashie commented Mar 8, 2021

Copy link
Copy Markdown
Member

Interesting. PR is welcome 😄

@withshubh withshubh mentioned this pull request Mar 8, 2021
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.

3 participants