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

Redundant_catch refactored #577

Merged
merged 5 commits into from
Jul 30, 2020
Merged

Redundant_catch refactored #577

merged 5 commits into from
Jul 30, 2020

Conversation

Vitaly-Protasov
Copy link
Collaborator

Solved in case of #528

Also test was change because of previous error (you can check the sourse code and make sure that this code structure should be detected too

aravij
aravij previously approved these changes Jul 29, 2020
@aravij
Copy link
Contributor

aravij commented Jul 29, 2020

@acheshkov @lyriccoder I have finished the task, so please take additional look and merge if it is ok.

Copy link
Member

@lyriccoder lyriccoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change test case and fix code

@@ -104,4 +104,4 @@ def test_fake_try_in_lambda(self):
"""
pattern = RedundantCatch()
lines = pattern.value(os.path.dirname(os.path.realpath(__file__)) + '/Cache.java')
self.assertEqual(lines, [])
self.assertEqual(lines, [393])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it's wrong behaviour. W have lambda. There is no another way to handle exception in lambda. There was a test to check that. If we have try in lambda, we should ignore it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lyriccoder I FIXED IT!

lyriccoder
lyriccoder previously approved these changes Jul 29, 2020
Copy link
Member

@lyriccoder lyriccoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@acheshkov
Copy link
Member

@rultor merge

@aravij
Copy link
Contributor

aravij commented Jul 30, 2020

@rultor why not merging?

@rultor
Copy link
Collaborator

rultor commented Jul 30, 2020

@rultor merge

@acheshkov OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit 342fc2b into master Jul 30, 2020
@rultor
Copy link
Collaborator

rultor commented Jul 30, 2020

@rultor merge

@acheshkov Done! FYI, the full log is here (took me 30min)

@rultor
Copy link
Collaborator

rultor commented Jul 30, 2020

@rultor why not merging?

@aravij Thanks for your request. @yegor256 Please confirm this.

@aravij aravij deleted the issue_528_13 branch July 31, 2020 14:55
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.

5 participants