Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 988bce72 authored by Mark Harman's avatar Mark Harman
Browse files

Disable CommentedOutCode warning.

parent 92c30f64
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
    <inspection_tool class="AndroidLintUnusedResources" enabled="false" level="WARNING" enabled_by_default="false" />
    <inspection_tool class="BooleanMethodIsAlwaysInverted" enabled="false" level="WARNING" enabled_by_default="false" />
    <inspection_tool class="CharsetObjectCanBeUsed" enabled="false" level="WARNING" enabled_by_default="false" />
    <inspection_tool class="CommentedOutCode" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
    <inspection_tool class="ConstantConditions" enabled="false" level="WARNING" enabled_by_default="false">
      <option name="SUGGEST_NULLABLE_ANNOTATIONS" value="false" />
      <option name="DONT_REPORT_TRUE_ASSERT_STATEMENTS" value="false" />
+3 −2
Original line number Diff line number Diff line
@@ -25,8 +25,9 @@ Android inspection warnings/errors
The file .idea/inspectionProfiles/Project_Default.xml contains settings for Android inpsections (see Editor/Inspections). The following have been disabled:

* AndroidLintUnusedResources - seems to give false information on res/ images, as well as complaining about renderscript files in build folders.
* CharsetObjectCanBeUsed - This seems fundamentally broken, as it'll recommend using StandardCharsets, and then give an error that that's not available before API level 19! E.g., see Charset.forName("UTF-8") in SettingsManager.saveSettings(). Strangely though it doesn't warn about the API level if we replace it in ImageSaver.saveImageNow().
* BooleanMethodIsAlwaysInverted - Generates too many useless warnings.
* CharsetObjectCanBeUsed - This seems fundamentally broken, as it'll recommend using StandardCharsets, and then give an error that that's not available before API level 19! E.g., see Charset.forName("UTF-8") in SettingsManager.saveSettings(). Strangely though it doesn't warn about the API level if we replace it in ImageSaver.saveImageNow().
* CommentedOutCode - Commented out code is usually intentional!
* ConstantConditions - Unfortunately this seems broken when calling an Android SDK function where only a stub source is available, such that the inspection incorrectly things an exception is thrown. E.g., see calls to TouchUtils.clickView() in MainActivityTest, this inspection thinks that e.g. "i<8" in for loops is always true.
* EmptyMethod - Sometimes can be useful to explicitly have a subclassed empty method, to show I've intentionally left it empty rather than forgotten to consider it.
* EmptyStatementBody - These may be intentional.
@@ -51,4 +52,4 @@ Homepage: http://opencamera.org.uk/

Google Play download: https://play.google.com/store/apps/details?id=net.sourceforge.opencamera

Mark Harman 24 April 2021
Mark Harman 16 August 2021