[Android] Add inspections settings for AndroidStudio
1. Add ChromiumInspections.xml that specifies Chromium-specific inspection profiles for AndroidStudio. 2. Update docs for importing ChromiumStyle.xml and ChromiumInspections.xml. Bug: 620034 Change-Id: Icd6821142bc87fc2dcd458910330e61173dc48aa Reviewed-on: https://chromium-review.googlesource.com/662785 Reviewed-by: Peter Wen <wnwen@chromium.org> Reviewed-by: Yaron Friedman <yfriedman@chromium.org> Commit-Queue: Boris Sazonov <bsazonov@chromium.org> Cr-Commit-Position: refs/heads/master@{#501931}
This commit is contained in:

committed by
Commit Bot

parent
d6443c3172
commit
a084e8f979
@ -88,10 +88,13 @@ includes `R.java`).
|
||||
* Launch it with more RAM:
|
||||
`STUDIO_VM_OPTIONS=-Xmx2048m /opt/android-studio-stable/bin/studio-launcher.sh`
|
||||
* If you ever need to reset it: `rm -r ~/.AndroidStudio*/`
|
||||
* Import Android style settings:
|
||||
* Import Chromium-specific style and inspections settings:
|
||||
* Help -> Find Action -> "Code Style" (settings) -> Java ->
|
||||
Manage -> Import -> select "Intellij IDEA code style XML" -> OK
|
||||
* Select `tools/android/android_studio/ChromiumStyle.xml`
|
||||
Scheme -> Import Scheme
|
||||
* Select `tools/android/android_studio/ChromiumStyle.xml` -> OK
|
||||
* Help -> Find Action -> "Inspections" (settings) ->
|
||||
Profile -> Import profile
|
||||
* Select `tools/android/android_studio/ChromiumInspections.xml` -> OK
|
||||
* Turn on automatic import:
|
||||
* Help -> Find Action -> "Auto Import"
|
||||
* Tick all the boxes under "Java" and change the dropdown to "All".
|
||||
|
6
tools/android/android_studio/ChromiumInspections.xml
Normal file
6
tools/android/android_studio/ChromiumInspections.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Chromium" />
|
||||
<!-- We use asserts in Chromium. See https://chromium.googlesource.com/chromium/src/+/master/styleguide/java/java.md#Asserts -->
|
||||
<inspection_tool class="AndroidLintAssert" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintRtlCompat" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
</profile>
|
Reference in New Issue
Block a user