Skip to content

Commit

Permalink
Merge pull request #101 from DevFactory/release/Loops_should_not_cont…
Browse files Browse the repository at this point in the history
…ain_more_than_a_single_break_or_continue_statement_part_1

Fixing squid:S135 Loops should not contain more than a single "break" or "continue" statement
  • Loading branch information
PeteGoo authored Jun 22, 2016
2 parents 2a8b333 + 3de326d commit 4cb165f
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,10 @@ public String getDescriptionSuffix(BuildStateEnum state) {
public boolean allEnabled() {
boolean areAllEnbled = true;
for (BuildStateEnum state : states.keySet()){
if (state.equals(BUILD_BROKEN)){
if (states.get(BUILD_BROKEN).isEnabled()){
return false;
}
continue;
if ((state.equals(BUILD_BROKEN) && states.get(BUILD_BROKEN).isEnabled()) || (state.equals(BUILD_FIXED) && states.get(BUILD_FIXED).isEnabled())){
return false;
}
if (state.equals(BUILD_FIXED)){
if (states.get(BUILD_FIXED).isEnabled()){
return false;
}
if (state.equals(BUILD_BROKEN) || state.equals(BUILD_FIXED)) {
continue;
}
areAllEnbled = areAllEnbled && states.get(state).isEnabled();
Expand Down

0 comments on commit 4cb165f

Please sign in to comment.