Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Make the code in scanner/groovy.rb robust.#228

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
junaruga wants to merge1 commit intorubychan:master
base:master
Choose a base branch
Loading
fromjunaruga:hotfix/scanner-groovy

Conversation

@junaruga
Copy link
Contributor

Fix small issues forlib/coderay/scanners/groovy.rb.

inline_block_paren_depth is initialized asnil.
But the codeinline_block_paren_depth += 1,inline_block_paren_depth -= 1,inline_block_paren_depth == 0 has a possibility to raise unintendedNoMethodError.
It looks good to initializeinline_block_paren_depth is initialized as0 or add checks before the codes.

  1. string_delimiter can benil as a possibility. Adding checks looks better.

@kornykorny self-assigned thisFeb 23, 2019
@junaruga
Copy link
ContributorAuthor

junaruga commentedFeb 23, 2019
edited
Loading

This report is by a static code analysis tool in our company (Maybe Coverity Scan).

@korny
Copy link
Member

Mmh. I don’t think there’s really a bug here, since I never got an error with the current version even with thorough testing (see the scanner test suite). While I agree with the first change, the second one would slow down the scanner. I don’t think we need such checks unless someone can actually produce an error here :)

@junaruga
Copy link
ContributorAuthor

Sure,@korny . I respect your decision. It's up to you.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@kornykorny

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@junaruga@korny

[8]ページ先頭

©2009-2025 Movatter.jp