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

Report switch statement fall-through as an error #18

Merged
merged 1 commit into from
Oct 7, 2015
Merged

Report switch statement fall-through as an error #18

merged 1 commit into from
Oct 7, 2015

Conversation

dgalling
Copy link
Contributor

@dgalling dgalling commented Oct 7, 2015

No description provided.

@@ -2,5 +2,6 @@
<inspections version="1.0" is_locked="false">
<option name="myName" value="Square" />
<inspection_tool class="UnnecessarySemicolon" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="FallthruInSwitchStatement" enabled="true" level="ERROR" enabled_by_default="true" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

/nit should we keep these alphabetized?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, good point, I'll do that. Do you know if GitHub will correctly handle me amending and force-pushing this commit?

Copy link
Collaborator

Choose a reason for hiding this comment

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

been a while since I've used github, I'll defer to Jake but I think it's fine

Copy link
Collaborator

Choose a reason for hiding this comment

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

It will

On Wed, Oct 7, 2015 at 3:06 PM Davis Gallinghouse notifications@github.com
wrote:

In configs/inspection/Square.xml
#18 (comment):

@@ -2,5 +2,6 @@

-

Yeah, good point, I'll do that. Do you know if GitHub will correctly
handle me amending and force-pushing this commit?


Reply to this email directly or view it on GitHub
https://github.com/square/java-code-styles/pull/18/files#r41432059.

@JakeWharton
Copy link
Collaborator

I assume this can be suppressed? Fall-through can be very useful.

@dgalling
Copy link
Contributor Author

dgalling commented Oct 7, 2015

The documentation says

This inspection ignores any fall-through commented with a text matching the regex pattern (?i)falls?\s*thro?u.

@JakeWharton
Copy link
Collaborator

Excellent!

On Wed, Oct 7, 2015 at 3:08 PM Davis Gallinghouse notifications@github.com
wrote:

The documentation says

This inspection ignores any fall-through commented with a text matching
the regex pattern (?i)falls?\s*thro?u.


Reply to this email directly or view it on GitHub
#18 (comment)
.

JakeWharton added a commit that referenced this pull request Oct 7, 2015
Report switch statement fall-through as an error
@JakeWharton JakeWharton merged commit 59f7bbd into square:master Oct 7, 2015
@wesleyk
Copy link
Collaborator

wesleyk commented Oct 7, 2015

Thx Davis!

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