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

New check: only one break or continue statement should be inside cycle body #374

Closed
sabaka opened this issue Sep 13, 2015 · 5 comments
Closed
Labels
Milestone

Comments

@sabaka
Copy link
Member

@sabaka sabaka commented Sep 13, 2015

Restricting the number of break and continue statements in a loop is done in the interest of good structured programming.

One break and continue statement is acceptable in a loop, since it facilitates optimal coding. If there is more than one, the code should be refactored to increase readability.

inspired by: http://nemo.sonarqube.org/coding_rules#languages=java|q=one%20break

that rule already enforced over Checkstyle codebase.

@romani romani added the easy label Sep 13, 2015
@yaziza
Copy link
Member

@yaziza yaziza commented Dec 19, 2015

Hi, i wanna contribute to the project and i think this issue can be a good starting as it s labeled easy.

Can you please give some hint where to start ?
Thank you !

yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Dec 20, 2015
…atement should be inside cycle body

Signed-off-by: Yasser Aziza <yasser.aziza@gmail.com>
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Dec 22, 2015
…atement should be inside cycle body

Signed-off-by: Yasser Aziza <yasser.aziza@gmail.com>
@yaziza
Copy link
Member

@yaziza yaziza commented Dec 22, 2015

Hi, i have started working on this issue, i will fix all checkstyle violations and write unit tests on the next few days. Feedback highly appreciated :)

@romani
Copy link
Member

@romani romani commented Dec 22, 2015

please finish with checkstyle violations first and then share a link for review.

yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Dec 25, 2015
…atement should be inside cycle body

Signed-off-by: Yasser Aziza <yasser.aziza@gmail.com>
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Dec 26, 2015
…atement should be inside cycle body

Signed-off-by: Yasser Aziza <yasser.aziza@gmail.com>
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Dec 27, 2015
…atement should be inside cycle body

Signed-off-by: Yasser Aziza <yasser.aziza@gmail.com>
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Dec 31, 2015
…atement should be inside cycle body

Signed-off-by: Yasser Aziza <yasser.aziza@gmail.com>
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 6, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 11, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 11, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 11, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 17, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 17, 2016
romani added a commit that referenced this issue Jan 17, 2016
@romani romani added this to the 1.18 milestone Jan 17, 2016
@romani
Copy link
Member

@romani romani commented Jan 17, 2016

merged.

@romani romani closed this Jan 17, 2016
romani added a commit that referenced this issue Jan 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.