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

Fixing squid:SwitchLastCaseIsDefaultCheck - "switch" statements should end with a "default" clause #212

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/main/java/com/github/maven_nar/NarLogger.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ public final void messageLogged(final BuildEvent event) {
case Project.MSG_VERBOSE:
this.log.debug(msg);
break;
default:
case Project.MSG_DEBUG:
this.log.debug(msg);
break;
default:
break;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ protected String getInputFileArgument(final File outputDir, final String filenam
final String outputFileName = getOutputFileNames(filename, null)[0];
final String objectName = new File(outputDir, outputFileName).toString();
return objectName;
default:
break;
}
String relative="";
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ public void addWarningSwitch(final Vector<String> args, final int level) {
case 5:
args.addElement("/warn:errors");
break;
default:
break;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ public int bid(final String inputFile) {
//
case 1:
return 0;
default:
break;
}
return bid;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@ protected CompilerConfiguration createConfiguration(final CCTask task, final Lin
case 2:
endCount++;
break;
default:
break;
}
}
final String[] endArgs = new String[endCount];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ public void addWarningSwitch(final Vector<String> args, final int level) {
case 3:
args.addElement("-Wall");
break;
default:
break;
}
}

Expand All @@ -153,6 +155,8 @@ protected String getInputFileArgument(final File outputDir, final String filenam
final String outputFileName = getOutputFileNames(filename, null)[0];
final String objectName = new File(outputDir, outputFileName).toString();
return objectName;
default:
break;
}
String relative="";
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ public void addWarningSwitch(final Vector<String> args, final int level) {
case 2:
args.addElement("+w");
break;
default:
break;
/*
* case 3: case 4: case 5: args.addElement("+w2"); break;
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ public void addWarningSwitch(final Vector<String> args, final int level) {
case 5:
args.addElement("-qhalt=w:w");
break;
default:
break;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ protected String getInputFileArgument(final File outputDir, final String filenam
return "/tlb";
case 1:
return new File(outputDir, getOutputFileNames(filename, null)[0]).getAbsolutePath();
default:
break;
}
return filename;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ protected String getInputFileArgument(final File outputDir, final String filenam
return "-r";
case 1:
return outputDir.getAbsolutePath();
default:
break;
}
return filename;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public static void addWarningSwitch(final Vector<String> args, final int level)
case 5:
args.addElement("/WX");
break;
default:
break;
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/github/maven_nar/cpptasks/parser/PostE.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public AbstractParserState consume(final char ch) {
return this.quote;
case '\n':
return getParser().getNewLineState();
default:
break;
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ public void addWarningSwitch(final Vector<String> args, final int level) {
case 5:
args.addElement("+w2");
args.addElement("-xwe");
break;
default:
break;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ public void addWarningSwitch(final Vector<String> args, final int level) {
case 5:
args.addElement("+w2");
break;
default:
break;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ public void addWarningSwitch(final Vector<String> args, final int level) {
case 5:
args.addElement("+w2");
break;
default:
break;
}
}

Expand Down