summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2014-09-05 08:51:02 -0700
committerTor Norbye <tnorbye@google.com>2014-09-08 19:33:00 +0000
commita39e3c44ee6ae11f61bb1a40e94137132fa4423b (patch)
treea3a692eae1d3834c961f465f3fce5cd7d94bcfed
parent4a5b724d9fc18eb12aa59ec23c74e39399ab5c03 (diff)
downloadidea-a39e3c44ee6ae11f61bb1a40e94137132fa4423b.tar.gz
75780: Android Studio: remove J2ME from Project Default code inspection profile
Move the SimplifiableIf inspection over to the code style category. Change-Id: I67a1744dfb22afb0d5bc0874cdacb4cbfc93721e (cherry picked from commit 28b87e43491f3dc4738ef4ad607e2d855f37a88c)
-rw-r--r--plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/META-INF/InspectionGadgets.xml10
-rw-r--r--plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableIfStatement.html5
2 files changed, 7 insertions, 8 deletions
diff --git a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/META-INF/InspectionGadgets.xml b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/META-INF/InspectionGadgets.xml
index 81cc13aea292..c8d1f3695cd4 100644
--- a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/META-INF/InspectionGadgets.xml
+++ b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/META-INF/InspectionGadgets.xml
@@ -703,6 +703,12 @@
key="simplifiable.conditional.expression.display.name" groupBundle="messages.InspectionsBundle"
groupKey="group.names.control.flow.issues" enabledByDefault="true" level="WARNING"
implementationClass="com.siyeh.ig.controlflow.SimplifiableConditionalExpressionInspection"/>
+ <!-- Moved in Android Studio over to the Code Style category where it more logically belongs since this is the only one enabled by default
+ in the J2ME category and it's really just a code style issue (and there are 4 other Simplifiable-Something conditions here) -->
+ <localInspection language="JAVA" shortName="SimplifiableIfStatement" bundle="com.siyeh.InspectionGadgetsBundle"
+ key="simplifiable.if.statement.display.name" groupBundle="messages.InspectionsBundle"
+ groupKey="group.names.code.style.issues" enabledByDefault="true" level="WARNING"
+ implementationClass="com.siyeh.ig.j2me.SimplifiableIfStatementInspection"/>
<localInspection language="JAVA" shortName="SwitchStatementDensity" bundle="com.siyeh.InspectionGadgetsBundle"
key="switch.statement.density.display.name" groupBundle="messages.InspectionsBundle"
groupKey="group.names.control.flow.issues" enabledByDefault="false" level="WARNING"
@@ -1191,10 +1197,6 @@
bundle="com.siyeh.InspectionGadgetsBundle" key="recordstore.opened.not.safely.closed.display.name"
groupBundle="messages.InspectionsBundle" groupKey="group.names.j2me.issues" enabledByDefault="false" level="WARNING"
implementationClass="com.siyeh.ig.j2me.RecordStoreResourceInspection"/>
- <localInspection language="JAVA" shortName="SimplifiableIfStatement" bundle="com.siyeh.InspectionGadgetsBundle"
- key="simplifiable.if.statement.display.name" groupBundle="messages.InspectionsBundle"
- groupKey="group.names.j2me.issues" enabledByDefault="true" level="WARNING"
- implementationClass="com.siyeh.ig.j2me.SimplifiableIfStatementInspection"/>
<localInspection language="JAVA" shortName="SingleCharacterStartsWith" bundle="com.siyeh.InspectionGadgetsBundle"
key="single.character.startswith.display.name" groupBundle="messages.InspectionsBundle"
groupKey="group.names.j2me.issues" enabledByDefault="false" level="WARNING"
diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableIfStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableIfStatement.html
index 398d5cbb1b59..99642963522d 100644
--- a/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableIfStatement.html
+++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableIfStatement.html
@@ -1,8 +1,5 @@
<html>
<body>
-This inspection is intended for J2ME and other highly resource constrained environments.
-Applying the results of this inspection without consideration might have negative effects on code clarity and design.
-<p>
Reports if statements of the form
<b>if (<i>condition</i>) return true else return <i>foo</i></b>
or <b>if (<i>condition</i>) return false else return <i>foo</i></b>.
@@ -13,4 +10,4 @@ These expressions may be safely simplified to
<p>
</body>
-</html> \ No newline at end of file
+</html>