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

Closed
sabaka opened this Issue Sep 13, 2015 · 5 comments

Projects

None yet

3 participants

@sabaka
Member
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
Member
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 yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Dec 20, 2015
@yaziza yaziza Issue #374: New check: only one break or continue statement should be…
… inside cycle body

Signed-off-by: Yasser Aziza <yasser.aziza@gmail.com>
db8a73c
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Dec 22, 2015
@yaziza yaziza Issue #374: New check: only one break or continue statement should be…
… inside cycle body

Signed-off-by: Yasser Aziza <yasser.aziza@gmail.com>
bde230b
@yaziza
Member
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
Member
romani commented Dec 22, 2015

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

@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Dec 25, 2015
@yaziza yaziza Issue #374: New check: only one break or continue statement should be…
… inside cycle body

Signed-off-by: Yasser Aziza <yasser.aziza@gmail.com>
ff85308
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Dec 26, 2015
@yaziza yaziza Issue #374: New check: only one break or continue statement should be…
… inside cycle body

Signed-off-by: Yasser Aziza <yasser.aziza@gmail.com>
a74faca
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Dec 27, 2015
@yaziza yaziza Issue #374: New check: only one break or continue statement should be…
… inside cycle body

Signed-off-by: Yasser Aziza <yasser.aziza@gmail.com>
d3df6ef
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Dec 31, 2015
@yaziza yaziza Issue #374: New check: only one break or continue statement should be…
… inside cycle body

Signed-off-by: Yasser Aziza <yasser.aziza@gmail.com>
594c92a
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 6, 2016
@yaziza yaziza Issue #374: New check: only one break or continue statement should be…
… inside cycle body
ffcb238
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 11, 2016
@yaziza yaziza Issue #374: New check: only one break or continue statement should be…
… inside cycle body
2019820
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 11, 2016
@yaziza yaziza Issue #374: Fix SingleBreakOrContinue violations 42805f5
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 11, 2016
@yaziza yaziza Issue #374: Fix SingleBreakOrContinue violations 603ef9a
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 17, 2016
@yaziza yaziza Issue #374: Fix SingleBreakOrContinue violations 3bb6ba5
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 17, 2016
@yaziza yaziza Issue #374: Fix SingleBreakOrContinue violations ff7543e
@romani romani added this to the 1.18 milestone Jan 17, 2016
@romani
Member
romani commented Jan 17, 2016

merged.

@romani romani closed this Jan 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment