mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-29 01:53:51 +07:00
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
37 lines
752 B
HTML
37 lines
752 B
HTML
<html>
|
|
<body>
|
|
Reports <code>switch</code> statements over enumerated types that are not exhaustive.
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
<b>enum</b> AlphaBetaGamma {
|
|
A, B, C;
|
|
|
|
<b>void</b> x(AlphaBetaGamma e) {
|
|
<b>switch</b> (e) {
|
|
|
|
}
|
|
}
|
|
}
|
|
</code></pre>
|
|
<p>After the quick-fix is applied:</p>
|
|
<pre><code>
|
|
<b>enum</b> AlphaBetaGamma {
|
|
A, B, C;
|
|
|
|
<b>void</b> x(AlphaBetaGamma e) {
|
|
<b>switch</b> (e) {
|
|
<b>case</b> A -> {}
|
|
<b>case</b> B -> {}
|
|
<b>case</b> C -> {}
|
|
}
|
|
}
|
|
}
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
<p>
|
|
Use the <b>Ignore switch statements with a default branch </b> option to ignore <code>switch</code>
|
|
statements that have a <code>default</code> branch.
|
|
<p>
|
|
|
|
</body>
|
|
</html> |