Commit f74622e6 authored by Peter Wen's avatar Peter Wen Committed by Commit Bot

Android: Use per-target lint-suppressions.xml

Previously all lint targets shared one lint suppressions/config file:
//build/android/lint/suppressions.xml

This resulted in many unnecessary suppressions being added which then
suppress the lint checks for every lint target. e.g. if monochrome fails
ObsoleteSdkInt checks, suppressing it globally turns off the checks for
all other apks, which decreases the utility of android lint for all
those other apks.

This CL removes the shared suppressions.xml file and splits its content
between the targets that actually need them, and adds lint-baseline.xml
files where necessary. This also removes the bottleneck of requiring a
//build/android/OWNERS to stamp every lint suppression change.

This CL also adds suppressions for targets depending on code that chrome
already lints via monochrome. E.g. errors in //base are shared by all
embedders' lint targets, and it should not become the burden of targets
like cast shell or cronet to fix. Thus these errors are suppressed in
cronet/cast/remoting-specific suppressions.xml files.

This CL changes lint to run in the output directory so that baseline
suppressions work for generated files (e.g. AndroidManifest.xml).

Bug: 1113795,1115594
Fixes: 1115594
Change-Id: I2d70128707c0fa862c109b6f91631a07916c90d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2346857
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: default avatarYuchen Liu <yucliu@chromium.org>
Reviewed-by: default avatarPaul Jensen <pauljensen@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarBo <boliu@chromium.org>
Reviewed-by: default avatarLambros Lambrou <lambroslambrou@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798776}
parent 52c7618e
...@@ -132,6 +132,7 @@ public class BoundaryInterfaceReflectionUtil { ...@@ -132,6 +132,7 @@ public class BoundaryInterfaceReflectionUtil {
* @param invocationHandler a {@link Nullable} InvocationHandlerWithDelegateGetter. * @param invocationHandler a {@link Nullable} InvocationHandlerWithDelegateGetter.
* @return the corresponding delegate. * @return the corresponding delegate.
*/ */
@RequiresApi(Build.VERSION_CODES.KITKAT)
@Nullable @Nullable
public static Object getDelegateFromInvocationHandler( public static Object getDelegateFromInvocationHandler(
@Nullable InvocationHandler invocationHandler) { @Nullable InvocationHandler invocationHandler) {
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
Nothing in the manifest is used, but it is still required by aapt. Nothing in the manifest is used, but it is still required by aapt.
--> -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.dummy"> package="org.dummy"
android:versionCode="1"
android:versionName="1.0">
</manifest> </manifest>
...@@ -23,6 +23,15 @@ from util import manifest_utils ...@@ -23,6 +23,15 @@ from util import manifest_utils
_LINT_MD_URL = 'https://chromium.googlesource.com/chromium/src/+/master/build/android/docs/lint.md' # pylint: disable=line-too-long _LINT_MD_URL = 'https://chromium.googlesource.com/chromium/src/+/master/build/android/docs/lint.md' # pylint: disable=line-too-long
# These checks are not useful for chromium.
_DISABLED_ALWAYS = [
"Assert", # R8 --force-enable-assertions is used to enable java asserts.
"MissingApplicationIcon", # False positive for non-production targets.
"SwitchIntDef", # Many C++ enums are not used at all in java.
"UniqueConstants", # Chromium enums allow aliases.
"UnusedAttribute", # Chromium apks have various minSdkVersion values.
]
# These checks are not useful for test targets and adds an unnecessary burden # These checks are not useful for test targets and adds an unnecessary burden
# to suppress them. # to suppress them.
_DISABLED_FOR_TESTS = [ _DISABLED_FOR_TESTS = [
...@@ -64,13 +73,13 @@ def _GenerateProjectFile(android_manifest, ...@@ -64,13 +73,13 @@ def _GenerateProjectFile(android_manifest,
android_sdk_version=None): android_sdk_version=None):
project = ElementTree.Element('project') project = ElementTree.Element('project')
root = ElementTree.SubElement(project, 'root') root = ElementTree.SubElement(project, 'root')
# An absolute path helps error paths to be shorter. # Run lint from output directory: crbug.com/1115594
root.set('dir', os.path.abspath(build_utils.DIR_SOURCE_ROOT)) root.set('dir', os.getcwd())
sdk = ElementTree.SubElement(project, 'sdk') sdk = ElementTree.SubElement(project, 'sdk')
# Lint requires that the sdk path be an absolute path. # Lint requires that the sdk path be an absolute path.
sdk.set('dir', os.path.abspath(android_sdk_root)) sdk.set('dir', os.path.abspath(android_sdk_root))
cache = ElementTree.SubElement(project, 'cache') cache = ElementTree.SubElement(project, 'cache')
cache.set('dir', _SrcRelative(cache_dir)) cache.set('dir', cache_dir)
main_module = ElementTree.SubElement(project, 'module') main_module = ElementTree.SubElement(project, 'module')
main_module.set('name', 'main') main_module.set('name', 'main')
main_module.set('android', 'true') main_module.set('android', 'true')
...@@ -78,35 +87,45 @@ def _GenerateProjectFile(android_manifest, ...@@ -78,35 +87,45 @@ def _GenerateProjectFile(android_manifest,
if android_sdk_version: if android_sdk_version:
main_module.set('compile_sdk_version', android_sdk_version) main_module.set('compile_sdk_version', android_sdk_version)
manifest = ElementTree.SubElement(main_module, 'manifest') manifest = ElementTree.SubElement(main_module, 'manifest')
manifest.set('file', _SrcRelative(android_manifest)) manifest.set('file', android_manifest)
if srcjar_sources: if srcjar_sources:
for srcjar_file in srcjar_sources: for srcjar_file in srcjar_sources:
src = ElementTree.SubElement(main_module, 'src') src = ElementTree.SubElement(main_module, 'src')
src.set('file', _SrcRelative(srcjar_file)) src.set('file', srcjar_file)
if sources: if sources:
for source in sources: for source in sources:
src = ElementTree.SubElement(main_module, 'src') src = ElementTree.SubElement(main_module, 'src')
src.set('file', _SrcRelative(source)) src.set('file', source)
if classpath: if classpath:
for file_path in classpath: for file_path in classpath:
classpath_element = ElementTree.SubElement(main_module, 'classpath') classpath_element = ElementTree.SubElement(main_module, 'classpath')
classpath_element.set('file', _SrcRelative(file_path)) classpath_element.set('file', file_path)
if resource_sources: if resource_sources:
for resource_file in resource_sources: for resource_file in resource_sources:
resource = ElementTree.SubElement(main_module, 'resource') resource = ElementTree.SubElement(main_module, 'resource')
resource.set('file', _SrcRelative(resource_file)) resource.set('file', resource_file)
return project return project
def _GenerateAndroidManifest(original_manifest_path, min_sdk_version): def _GenerateAndroidManifest(original_manifest_path, min_sdk_version,
android_sdk_version):
# Set minSdkVersion in the manifest to the correct value. # Set minSdkVersion in the manifest to the correct value.
doc, manifest, _ = manifest_utils.ParseManifest(original_manifest_path) doc, manifest, app_node = manifest_utils.ParseManifest(original_manifest_path)
if app_node.find(
'{%s}allowBackup' % manifest_utils.ANDROID_NAMESPACE) is None:
# Assume no backup is intended, appeases AllowBackup lint check and keeping
# it working for manifests that do define android:allowBackup.
app_node.set('{%s}allowBackup' % manifest_utils.ANDROID_NAMESPACE, 'false')
uses_sdk = manifest.find('./uses-sdk') uses_sdk = manifest.find('./uses-sdk')
if uses_sdk is None: if uses_sdk is None:
uses_sdk = ElementTree.Element('uses-sdk') uses_sdk = ElementTree.Element('uses-sdk')
manifest.insert(0, uses_sdk) manifest.insert(0, uses_sdk)
uses_sdk.set('{%s}minSdkVersion' % manifest_utils.ANDROID_NAMESPACE, uses_sdk.set('{%s}minSdkVersion' % manifest_utils.ANDROID_NAMESPACE,
min_sdk_version) min_sdk_version)
uses_sdk.set('{%s}targetSdkVersion' % manifest_utils.ANDROID_NAMESPACE,
android_sdk_version)
return doc return doc
...@@ -140,18 +159,20 @@ def _RunLint(lint_binary_path, ...@@ -140,18 +159,20 @@ def _RunLint(lint_binary_path,
logging.info('Lint starting') logging.info('Lint starting')
cmd = [ cmd = [
_SrcRelative(lint_binary_path), lint_binary_path,
# Consider all lint warnings as errors. Warnings should either always be # Consider all lint warnings as errors. Warnings should either always be
# fixed or completely suppressed in suppressions.xml. They should not # fixed or completely suppressed in suppressions.xml. They should not
# bloat build output if they are not important enough to be fixed. # bloat build output if they are not important enough to be fixed.
'-Werror', '-Werror',
'--exitcode', # Sets error code if there are errors. '--exitcode', # Sets error code if there are errors.
'--quiet', # Silences lint's "." progress updates. '--quiet', # Silences lint's "." progress updates.
'--disable',
','.join(_DISABLED_ALWAYS),
] ]
if baseline: if baseline:
cmd.extend(['--baseline', _SrcRelative(baseline)]) cmd.extend(['--baseline', baseline])
if config_path: if config_path:
cmd.extend(['--config', _SrcRelative(config_path)]) cmd.extend(['--config', config_path])
if testonly_target: if testonly_target:
cmd.extend(['--disable', ','.join(_DISABLED_FOR_TESTS)]) cmd.extend(['--disable', ','.join(_DISABLED_FOR_TESTS)])
...@@ -161,11 +182,11 @@ def _RunLint(lint_binary_path, ...@@ -161,11 +182,11 @@ def _RunLint(lint_binary_path,
logging.info('Generating Android manifest file') logging.info('Generating Android manifest file')
android_manifest_tree = _GenerateAndroidManifest(manifest_path, android_manifest_tree = _GenerateAndroidManifest(manifest_path,
min_sdk_version) min_sdk_version,
android_sdk_version)
# Include the rebased manifest_path in the lint generated path so that it is # Include the rebased manifest_path in the lint generated path so that it is
# clear in error messages where the original AndroidManifest.xml came from. # clear in error messages where the original AndroidManifest.xml came from.
lint_android_manifest_path = os.path.join(lint_gen_dir, lint_android_manifest_path = os.path.join(lint_gen_dir, manifest_path)
_SrcRelative(manifest_path))
logging.info('Writing xml file %s', lint_android_manifest_path) logging.info('Writing xml file %s', lint_android_manifest_path)
_WriteXmlFile(android_manifest_tree.getroot(), lint_android_manifest_path) _WriteXmlFile(android_manifest_tree.getroot(), lint_android_manifest_path)
...@@ -206,14 +227,13 @@ def _RunLint(lint_binary_path, ...@@ -206,14 +227,13 @@ def _RunLint(lint_binary_path,
project_xml_path = os.path.join(lint_gen_dir, 'project.xml') project_xml_path = os.path.join(lint_gen_dir, 'project.xml')
logging.info('Writing xml file %s', project_xml_path) logging.info('Writing xml file %s', project_xml_path)
_WriteXmlFile(project_file_root, project_xml_path) _WriteXmlFile(project_file_root, project_xml_path)
cmd += ['--project', _SrcRelative(project_xml_path)] cmd += ['--project', project_xml_path]
logging.info('Preparing environment variables') logging.info('Preparing environment variables')
env = os.environ.copy() env = os.environ.copy()
# It is important that lint uses the checked-in JDK11 as it is almost 50% # It is important that lint uses the checked-in JDK11 as it is almost 50%
# faster than JDK8. # faster than JDK8.
env['JAVA_HOME'] = os.path.relpath(build_utils.JAVA_HOME, env['JAVA_HOME'] = build_utils.JAVA_HOME
build_utils.DIR_SOURCE_ROOT)
# This filter is necessary for JDK11. # This filter is necessary for JDK11.
stderr_filter = build_utils.FilterReflectiveAccessJavaWarnings stderr_filter = build_utils.FilterReflectiveAccessJavaWarnings
...@@ -223,7 +243,6 @@ def _RunLint(lint_binary_path, ...@@ -223,7 +243,6 @@ def _RunLint(lint_binary_path,
# Lint outputs "No issues found" if it succeeds, and uses stderr when it # Lint outputs "No issues found" if it succeeds, and uses stderr when it
# fails, so we can safely ignore stdout. # fails, so we can safely ignore stdout.
build_utils.CheckOutput(cmd, build_utils.CheckOutput(cmd,
cwd=build_utils.DIR_SOURCE_ROOT,
env=env, env=env,
stderr_filter=stderr_filter) stderr_filter=stderr_filter)
end = time.time() - start end = time.time() - start
......
...@@ -986,18 +986,6 @@ if (enable_java_templates) { ...@@ -986,18 +986,6 @@ if (enable_java_templates) {
} }
} }
if (defined(invoker.lint_suppressions_file)) {
_suppressions_file = invoker.lint_suppressions_file
# The custom suppressions file might be a generated file needing a dep.
# e.g. generating it by appending to the default suppressions.xml file.
if (defined(invoker.lint_suppressions_dep)) {
deps += [ invoker.lint_suppressions_dep ]
}
} else {
_suppressions_file = "//build/android/lint/suppressions.xml"
}
if (defined(invoker.min_sdk_version)) { if (defined(invoker.min_sdk_version)) {
_min_sdk_version = invoker.min_sdk_version _min_sdk_version = invoker.min_sdk_version
} else { } else {
...@@ -1012,10 +1000,7 @@ if (enable_java_templates) { ...@@ -1012,10 +1000,7 @@ if (enable_java_templates) {
script = "//build/android/gyp/lint.py" script = "//build/android/gyp/lint.py"
depfile = "$target_gen_dir/$target_name.d" depfile = "$target_gen_dir/$target_name.d"
inputs = [ inputs = [ _lint_binary_path ]
_lint_binary_path,
_suppressions_file,
]
args = [ args = [
"--depfile", "--depfile",
...@@ -1024,8 +1009,6 @@ if (enable_java_templates) { ...@@ -1024,8 +1009,6 @@ if (enable_java_templates) {
rebase_path(_lint_binary_path, root_build_dir), rebase_path(_lint_binary_path, root_build_dir),
"--cache-dir", "--cache-dir",
rebase_path(_cache_dir, root_build_dir), rebase_path(_cache_dir, root_build_dir),
"--config-path",
rebase_path(_suppressions_file, root_build_dir),
"--lint-gen-dir", "--lint-gen-dir",
rebase_path(_lint_gen_dir, root_build_dir), rebase_path(_lint_gen_dir, root_build_dir),
"--android-sdk-version=${lint_android_sdk_version}", "--android-sdk-version=${lint_android_sdk_version}",
...@@ -1034,6 +1017,15 @@ if (enable_java_templates) { ...@@ -1034,6 +1017,15 @@ if (enable_java_templates) {
rebase_path(lint_android_sdk_root, root_build_dir), rebase_path(lint_android_sdk_root, root_build_dir),
] ]
if (defined(invoker.lint_suppressions_file)) {
inputs += [ invoker.lint_suppressions_file ]
args += [
"--config-path",
rebase_path(invoker.lint_suppressions_file, root_build_dir),
]
}
if (defined(testonly) && testonly) { if (defined(testonly) && testonly) {
# Allows us to ignore unnecessary checks when linting test targets. # Allows us to ignore unnecessary checks when linting test targets.
args += [ "--testonly" ] args += [ "--testonly" ]
...@@ -1047,6 +1039,22 @@ if (enable_java_templates) { ...@@ -1047,6 +1039,22 @@ if (enable_java_templates) {
args += [ "--warnings-as-errors" ] args += [ "--warnings-as-errors" ]
} }
if (defined(invoker.lint_baseline_file)) {
if (compute_inputs_for_analyze) {
# The baseline file is included in lint.py as a depfile dep. Since
# removing it regenerates the file, it is useful to not have this as
# a gn input during local development. Add it only for bots' analyze.
inputs += [ invoker.lint_baseline_file ]
}
args += [
# Baseline allows us to turn on lint warnings without fixing all the
# pre-existing issues. This stops the flood of new issues while the
# existing ones are being fixed.
"--baseline",
rebase_path(invoker.lint_baseline_file, root_build_dir),
]
}
if (defined(invoker.create_cache) && invoker.create_cache) { if (defined(invoker.create_cache) && invoker.create_cache) {
# Putting the stamp file in the cache dir allows us to depend on ninja # Putting the stamp file in the cache dir allows us to depend on ninja
# to create the cache dir for us. # to create the cache dir for us.
...@@ -1075,22 +1083,6 @@ if (enable_java_templates) { ...@@ -1075,22 +1083,6 @@ if (enable_java_templates) {
# The full classpath is required for annotation checks like @IntDef. # The full classpath is required for annotation checks like @IntDef.
"--classpath=@FileArg($_rebased_build_config:deps_info:javac_full_interface_classpath)", "--classpath=@FileArg($_rebased_build_config:deps_info:javac_full_interface_classpath)",
] ]
if (defined(invoker.lint_baseline_file)) {
if (compute_inputs_for_analyze) {
# The baseline file is included in lint.py as a depfile dep. Since
# removing it regenerates the file, it is useful to not have this as
# a gn input during local development. Add it only for bots' analyze.
inputs += [ invoker.lint_baseline_file ]
}
args += [
# Baseline allows us to turn on lint warnings without fixing all the
# pre-existing issues. This stops the flood of new issues while the
# existing ones are being fixed.
"--baseline",
rebase_path(invoker.lint_baseline_file, root_build_dir),
]
}
} }
outputs = [ _stamp_path ] outputs = [ _stamp_path ]
......
...@@ -3331,22 +3331,25 @@ if (enable_java_templates) { ...@@ -3331,22 +3331,25 @@ if (enable_java_templates) {
forward_variables_from(invoker, forward_variables_from(invoker,
[ [
"lint_baseline_file", "lint_baseline_file",
"lint_suppressions_dep",
"lint_suppressions_file", "lint_suppressions_file",
"min_sdk_version", "min_sdk_version",
]) ])
if (defined(invoker.lint_min_sdk_version)) {
min_sdk_version = invoker.lint_min_sdk_version
}
build_config = _build_config build_config = _build_config
build_config_dep = ":$_build_config_target" build_config_dep = ":$_build_config_target"
deps = [ ":$_java_target" ] deps = [ ":$_java_target" ]
if (defined(invoker.lint_suppressions_dep)) {
deps += [ invoker.lint_suppressions_dep ]
}
if (defined(invoker.lint_min_sdk_version)) {
min_sdk_version = invoker.lint_min_sdk_version
}
} }
} else { } else {
not_needed(invoker, not_needed(invoker,
[ [
"lint_baseline_file", "lint_baseline_file",
"lint_min_sdk_version", "lint_min_sdk_version",
"lint_suppressions_file",
]) ])
} }
...@@ -5012,22 +5015,25 @@ if (enable_java_templates) { ...@@ -5012,22 +5015,25 @@ if (enable_java_templates) {
forward_variables_from(invoker, forward_variables_from(invoker,
[ [
"lint_baseline_file", "lint_baseline_file",
"lint_suppressions_dep",
"lint_suppressions_file", "lint_suppressions_file",
"min_sdk_version", "min_sdk_version",
]) ])
if (defined(invoker.lint_min_sdk_version)) {
min_sdk_version = invoker.lint_min_sdk_version
}
build_config = _build_config build_config = _build_config
build_config_dep = ":$_build_config_target" build_config_dep = ":$_build_config_target"
deps = _module_java_targets deps = _module_java_targets
if (defined(invoker.lint_suppressions_dep)) {
deps += [ invoker.lint_suppressions_dep ]
}
if (defined(invoker.lint_min_sdk_version)) {
min_sdk_version = invoker.lint_min_sdk_version
}
} }
} else { } else {
not_needed(invoker, not_needed(invoker,
[ [
"lint_baseline_file", "lint_baseline_file",
"lint_min_sdk_version", "lint_min_sdk_version",
"lint_suppressions_file",
]) ])
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -22,8 +22,6 @@ Still reading? ...@@ -22,8 +22,6 @@ Still reading?
<issue id="AllowBackup" severity="ignore"/> <issue id="AllowBackup" severity="ignore"/>
<!-- TODO(crbug.com/804427): Remove this suppression or add rationale. --> <!-- TODO(crbug.com/804427): Remove this suppression or add rationale. -->
<issue id="AppCompatResource" severity="ignore"/> <issue id="AppCompatResource" severity="ignore"/>
<!-- We use asserts in Chromium. See https://chromium.googlesource.com/chromium/src/+/master/styleguide/java/java.md#Asserts -->
<issue id="Assert" severity="ignore"/>
<issue id="Autofill"> <issue id="Autofill">
<!-- Filed https://crbug.com/1073966 to fix --> <!-- Filed https://crbug.com/1073966 to fix -->
<ignore regexp="chrome/android/features/tab_ui/java/res/layout/bottom_tab_grid_toolbar.xml"/> <ignore regexp="chrome/android/features/tab_ui/java/res/layout/bottom_tab_grid_toolbar.xml"/>
...@@ -38,13 +36,8 @@ Still reading? ...@@ -38,13 +36,8 @@ Still reading?
<issue id="ButtonOrder" severity="Error"> <issue id="ButtonOrder" severity="Error">
<ignore regexp="chrome/android/java/res/layout/homepage_editor.xml"/> <ignore regexp="chrome/android/java/res/layout/homepage_editor.xml"/>
</issue> </issue>
<issue id="ButtonStyle" severity="Error">
<ignore regexp="remoting/android/host/res/layout/main.xml"/>
</issue>
<issue id="ClickableViewAccessibility" severity="ignore"/> <issue id="ClickableViewAccessibility" severity="ignore"/>
<issue id="ContentDescription" severity="Error"> <issue id="ContentDescription" severity="Error">
<ignore regexp="chromecast/internal"/>
<ignore regexp="remoting/android/internal"/>
<!--TODO(crbug.com/1044658): This suppression was added blindly, and needs investigated.--> <!--TODO(crbug.com/1044658): This suppression was added blindly, and needs investigated.-->
<ignore regexp="chrome/android/java/res/layout/contacts_list_item_view.xml"/> <ignore regexp="chrome/android/java/res/layout/contacts_list_item_view.xml"/>
<!--TODO(crbug.com/1044658): This suppression was added blindly, and needs investigated.--> <!--TODO(crbug.com/1044658): This suppression was added blindly, and needs investigated.-->
...@@ -94,14 +87,8 @@ Still reading? ...@@ -94,14 +87,8 @@ Still reading?
<issue id="GoogleAppIndexingWarning" severity="ignore"/> <issue id="GoogleAppIndexingWarning" severity="ignore"/>
<issue id="HandlerLeak"> <issue id="HandlerLeak">
<ignore regexp="android_webview/glue/java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java"/> <ignore regexp="android_webview/glue/java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java"/>
<ignore regexp="chromecast/internal"/>
<ignore regexp="remoting/android/java/src/org/chromium/chromoting/TapGestureDetector.java"/>
</issue> </issue>
<issue id="HardcodedDebugMode" severity="ignore"/> <issue id="HardcodedDebugMode" severity="ignore"/>
<issue id="HardcodedText" severity="Error">
<ignore regexp="chromecast/internal"/>
<ignore regexp="remoting/android/host/res/layout/main.xml"/>
</issue>
<issue id="IconColors" severity="Error"> <issue id="IconColors" severity="Error">
<ignore regexp="tools/android/audio_focus_grabber/java/res/drawable-.*/notification_icon.png"/> <ignore regexp="tools/android/audio_focus_grabber/java/res/drawable-.*/notification_icon.png"/>
</issue> </issue>
...@@ -113,38 +100,26 @@ Still reading? ...@@ -113,38 +100,26 @@ Still reading?
<ignore regexp="chrome/android/java/res/drawable-xxxhdpi"/> <ignore regexp="chrome/android/java/res/drawable-xxxhdpi"/>
<!-- This is intentional to save on WebAPKs' size. --> <!-- This is intentional to save on WebAPKs' size. -->
<ignore regexp="chrome/android/webapk/shell_apk/res/drawable-*"/> <ignore regexp="chrome/android/webapk/shell_apk/res/drawable-*"/>
<ignore regexp="chromecast/internal"/>
<ignore regexp="content/public/android/java/res/drawable-xxhdpi"/> <ignore regexp="content/public/android/java/res/drawable-xxhdpi"/>
<ignore regexp="content/public/android/java/res/drawable-xxxhdpi"/> <ignore regexp="content/public/android/java/res/drawable-xxxhdpi"/>
<ignore regexp="ui/android/java/res/drawable-xxhdpi"/> <ignore regexp="ui/android/java/res/drawable-xxhdpi"/>
<ignore regexp="ui/android/java/res/drawable-xxxhdpi"/> <ignore regexp="ui/android/java/res/drawable-xxxhdpi"/>
<ignore regexp="remoting/android/internal"/>
</issue> </issue>
<issue id="IconDipSize"> <issue id="IconDipSize">
<!-- These only need to be 1px for all densities. See: crbug.com/804449 --> <!-- These only need to be 1px for all densities. See: crbug.com/804449 -->
<ignore regexp="chrome/android/java/res/.*tab_strip_fade"/> <ignore regexp="chrome/android/java/res/.*tab_strip_fade"/>
<ignore regexp="chromecast/internal"/>
</issue> </issue>
<issue id="IconDuplicates" severity="Error"> <issue id="IconDuplicates" severity="Error">
<!-- mipmap version is used for app launcher only. drawables used for notifications -->
<ignore regexp="chromecast/browser/android/apk/res/mipmap-.*/app_icon.png"/>
<ignore regexp="chromecast/internal"/>
<!-- Filed https://crbug.com/1073963 --> <!-- Filed https://crbug.com/1073963 -->
<ignore regexp="clank/java/res_default/mipmap-.*/app_shortcut_icon.png"/> <ignore regexp="clank/java/res_default/mipmap-.*/app_shortcut_icon.png"/>
</issue> </issue>
<issue id="IconDuplicatesConfig" severity="Error">
<ignore regexp="chromecast/internal"/>
<ignore regexp="remoting/android/internal"/>
</issue>
<issue id="IconLauncherFormat" severity="ignore"/> <issue id="IconLauncherFormat" severity="ignore"/>
<issue id="IconLauncherShape" severity="Error"> <issue id="IconLauncherShape" severity="Error">
<ignore regexp="chrome/android/webapk/shell_apk/res/mipmap-mdpi/ic_launcher_background.png"/> <ignore regexp="chrome/android/webapk/shell_apk/res/mipmap-mdpi/ic_launcher_background.png"/>
<ignore regexp="chromecast/internal"/>
</issue> </issue>
<issue id="IconLocation"> <issue id="IconLocation">
<!-- This is just for testing --> <!-- This is just for testing -->
<ignore regexp="chrome/test/chromedriver/test/webview_shell/java/res/drawable/icon.png"/> <ignore regexp="chrome/test/chromedriver/test/webview_shell/java/res/drawable/icon.png"/>
<ignore regexp="chromecast/internal"/>
<!-- It is OK for content_shell_apk to have missing assets. --> <!-- It is OK for content_shell_apk to have missing assets. -->
<ignore regexp="content/shell/android/java/res/"/> <ignore regexp="content/shell/android/java/res/"/>
<!-- Memconsumer is only for tooling --> <!-- Memconsumer is only for tooling -->
...@@ -157,7 +132,6 @@ Still reading? ...@@ -157,7 +132,6 @@ Still reading?
<!-- This is intentional to reduce APK size. See: http://crrev/c/1352161 --> <!-- This is intentional to reduce APK size. See: http://crrev/c/1352161 -->
<ignore regexp="chrome/android/features/autofill_assistant/java/res"/> <ignore regexp="chrome/android/features/autofill_assistant/java/res"/>
<ignore regexp="chrome/android/webapk/shell_apk/res"/> <ignore regexp="chrome/android/webapk/shell_apk/res"/>
<ignore regexp="chromecast/internal"/>
<!-- crbug.com/457918 is tracking missing assets --> <!-- crbug.com/457918 is tracking missing assets -->
<ignore regexp="components/embedder_support/android/java/res"/> <ignore regexp="components/embedder_support/android/java/res"/>
<ignore regexp="tools/android/push_apps_to_background/res"/> <ignore regexp="tools/android/push_apps_to_background/res"/>
...@@ -207,7 +181,6 @@ Still reading? ...@@ -207,7 +181,6 @@ Still reading?
<!-- TODO(crbug.com/1039415): Remove suppression after fixing bug. --> <!-- TODO(crbug.com/1039415): Remove suppression after fixing bug. -->
<ignore regexp="chrome/android/feed/core/java/res/layout/feed_more_button.xml"/> <ignore regexp="chrome/android/feed/core/java/res/layout/feed_more_button.xml"/>
</issue> </issue>
<issue id="MissingApplicationIcon" severity="ignore"/>
<issue id="MissingClass" severity="ignore"/> <issue id="MissingClass" severity="ignore"/>
<issue id="MissingDefaultResource"> <issue id="MissingDefaultResource">
<!-- Only used by ToolbarControlContainer guarded by tablet form-factor. --> <!-- Only used by ToolbarControlContainer guarded by tablet form-factor. -->
...@@ -224,14 +197,10 @@ Still reading? ...@@ -224,14 +197,10 @@ Still reading?
<issue id="MissingRegistered" severity="ignore"/> <issue id="MissingRegistered" severity="ignore"/>
<issue id="MissingSuperCall" severity="Error"> <issue id="MissingSuperCall" severity="Error">
<!-- TODO(wnwen): File bug to fix --> <!-- TODO(wnwen): File bug to fix -->
<ignore regexp="remoting/android/java/src/org/chromium/chromoting/Chromoting.java"/>
<ignore regexp="chrome/android/java/src/org/chromium/chrome/browser/widget/selection/SelectionToolbar.java"/> <ignore regexp="chrome/android/java/src/org/chromium/chrome/browser/widget/selection/SelectionToolbar.java"/>
</issue> </issue>
<issue id="MissingTranslation"> <issue id="MissingTranslation">
<!-- http://crbug.com/450548 -->
<ignore regexp="chromecast/internal"/>
<ignore regexp="restriction_values.xml.*"/> <ignore regexp="restriction_values.xml.*"/>
<ignore regexp="remoting/resources/strings_java.resources.zip"/>
</issue> </issue>
<issue id="MissingVersion" severity="ignore"/> <issue id="MissingVersion" severity="ignore"/>
<issue id="NewApi"> <issue id="NewApi">
...@@ -283,7 +252,6 @@ Still reading? ...@@ -283,7 +252,6 @@ Still reading?
<issue id="RtlCompat" severity="ignore"/> <issue id="RtlCompat" severity="ignore"/>
<issue id="RtlEnabled" severity="ignore"/> <issue id="RtlEnabled" severity="ignore"/>
<issue id="RtlHardcoded" severity="Error"> <issue id="RtlHardcoded" severity="Error">
<ignore regexp="remoting/android/internal"/>
<!--TODO(crbug.com/1044658): This suppression was added blindly, and needs investigated.--> <!--TODO(crbug.com/1044658): This suppression was added blindly, and needs investigated.-->
<ignore regexp="chrome/android/java/res/layout/sheet_tab_toolbar.xml"/> <ignore regexp="chrome/android/java/res/layout/sheet_tab_toolbar.xml"/>
</issue> </issue>
...@@ -294,9 +262,6 @@ Still reading? ...@@ -294,9 +262,6 @@ Still reading?
</issue> </issue>
<issue id="SetJavaScriptEnabled" severity="ignore"/> <issue id="SetJavaScriptEnabled" severity="ignore"/>
<issue id="SignatureOrSystemPermissions" severity="ignore"/> <issue id="SignatureOrSystemPermissions" severity="ignore"/>
<issue id="SpUsage" severity="Error">
<ignore regexp="chromecast/internal"/>
</issue>
<issue id="StaticFieldLeak"> <issue id="StaticFieldLeak">
<!-- Nice to fix, but not necessary or performance critical. --> <!-- Nice to fix, but not necessary or performance critical. -->
<ignore regexp="This `AsyncTask` class should be static or leaks might occur"/> <ignore regexp="This `AsyncTask` class should be static or leaks might occur"/>
...@@ -313,29 +278,15 @@ Still reading? ...@@ -313,29 +278,15 @@ Still reading?
<!-- Many .xtb files have a % that is not part of a formatted string. https://crbug.com/941164 --> <!-- Many .xtb files have a % that is not part of a formatted string. https://crbug.com/941164 -->
<issue id="StringFormatInvalid" severity="ignore"/> <issue id="StringFormatInvalid" severity="ignore"/>
<issue id="StringFormatMatches" severity="ignore"/> <issue id="StringFormatMatches" severity="ignore"/>
<!-- We have many C++ enums that we don't care about in java -->
<issue id="SwitchIntDef" severity="ignore"/>
<issue id="TextFields" severity="Error">
<ignore regexp="chromecast/internal"/>
</issue>
<issue id="TypographyDashes" severity="Error"> <issue id="TypographyDashes" severity="Error">
<ignore regexp="chrome/app/policy/android/values-v21/restriction_values.xml"/> <ignore regexp="chrome/app/policy/android/values-v21/restriction_values.xml"/>
</issue> </issue>
<!-- Typos check disabled due to lint bug: http://crbug.com/671170 --> <!-- Typos check disabled due to lint bug: http://crbug.com/671170 -->
<issue id="Typos" severity="ignore"/> <issue id="Typos" severity="ignore"/>
<!-- Our generated enums are allowed to have the same values. -->
<issue id="UniqueConstants" severity="ignore"/>
<issue id="UnusedAttribute" severity="ignore"/>
<issue id="UnusedIds" severity="ignore"/> <issue id="UnusedIds" severity="ignore"/>
<issue id="UnusedQuantity" severity="ignore"/> <issue id="UnusedQuantity" severity="ignore"/>
<issue id="UnusedResources"> <issue id="UnusedResources">
<!-- Do not add new suppressions without rationale. --> <!-- Do not add new suppressions without rationale. -->
<!-- 1: raw resources are accessed by URL in various places -->
<ignore regexp="gen/remoting/android/.*/res/raw/credits.*"/>
<!-- 1: all resources in remoting internal -->
<ignore regexp="remoting/android/internal"/>
<!-- 1: string test only, used in CronetSmokeTestCase dynamically -->
<ignore regexp="R.string.TestSupportImplClass"/>
<!-- 1: resource used by android webview glue layer, could be refactored --> <!-- 1: resource used by android webview glue layer, could be refactored -->
<ignore regexp="R.string.private_browsing_warning"/> <ignore regexp="R.string.private_browsing_warning"/>
<!-- 4: The WAM server currently has 2 codes paths for minting a WebAPK, and <!-- 4: The WAM server currently has 2 codes paths for minting a WebAPK, and
...@@ -382,8 +333,6 @@ Still reading? ...@@ -382,8 +333,6 @@ Still reading?
<ignore regexp="android_webview/tools/automated_ui_tests/java/res/layout/"/> <ignore regexp="android_webview/tools/automated_ui_tests/java/res/layout/"/>
<!-- 1: resource in //ui because it's used by multiple deps. --> <!-- 1: resource in //ui because it's used by multiple deps. -->
<ignore regexp="The resource `R.drawable.*_expand_.*` appears to be unused"/> <ignore regexp="The resource `R.drawable.*_expand_.*` appears to be unused"/>
<!-- 1 resource used by android tv to generate resources.zip file -->
<ignore regexp="chromecast/internal/shell/browser/android/java/res/drawable-hdpi/ic_settings_cast.png"/>
<!-- 1 string used by Android's policies system, pulled from app directly --> <!-- 1 string used by Android's policies system, pulled from app directly -->
<ignore regexp="restriction_values.xml"/> <ignore regexp="restriction_values.xml"/>
<!--TODO(crbug.com/1044658): This suppression was added blindly, and needs investigated.--> <!--TODO(crbug.com/1044658): This suppression was added blindly, and needs investigated.-->
...@@ -442,7 +391,6 @@ Still reading? ...@@ -442,7 +391,6 @@ Still reading?
<issue id="UselessParent"> <issue id="UselessParent">
<ignore regexp="android_webview/tools/system_webview_shell/apk/res/layout/activity_webview_browser.xml"/> <ignore regexp="android_webview/tools/system_webview_shell/apk/res/layout/activity_webview_browser.xml"/>
<ignore regexp="chrome/android/java/res/layout/data_usage_breakdown.xml"/> <ignore regexp="chrome/android/java/res/layout/data_usage_breakdown.xml"/>
<ignore regexp="chromecast/internal"/>
<ignore regexp="tools/android/kerberos/SpnegoAuthenticator/res/layout/activity_account_authenticator.xml"/> <ignore regexp="tools/android/kerberos/SpnegoAuthenticator/res/layout/activity_account_authenticator.xml"/>
</issue> </issue>
<issue id="UsesMinSdkAttributes" severity="ignore"/> <issue id="UsesMinSdkAttributes" severity="ignore"/>
...@@ -458,8 +406,6 @@ Still reading? ...@@ -458,8 +406,6 @@ Still reading?
<issue id="VisibleForTests" severity="Error"> <issue id="VisibleForTests" severity="Error">
<ignore regexp="/javatests/"/> <ignore regexp="/javatests/"/>
<ignore regexp="/test/"/> <ignore regexp="/test/"/>
<!-- TODO(wnwen): File bug to fix -->
<ignore regexp="remoting/android/internal/apk/src/org/chromium/chromoting/RemotingApplication.java"/>
<!-- TODO(crbug.com/757124): Remove all these specific Feedback files after underlying issue is resolved --> <!-- TODO(crbug.com/757124): Remove all these specific Feedback files after underlying issue is resolved -->
<!-- Underlying issue is that Android FeedbackOptions.Builder using @VisibleForTesting without 'otherwise='. --> <!-- Underlying issue is that Android FeedbackOptions.Builder using @VisibleForTesting without 'otherwise='. -->
<ignore regexp="clank/java/src/com/google/android/apps/chrome/feedback/FeedbackUtil.java"/> <ignore regexp="clank/java/src/com/google/android/apps/chrome/feedback/FeedbackUtil.java"/>
......
...@@ -85,9 +85,10 @@ template("chrome_bundle") { ...@@ -85,9 +85,10 @@ template("chrome_bundle") {
"keystore_name", "keystore_name",
"keystore_password", "keystore_password",
"keystore_path", "keystore_path",
"lint_baseline_file",
"lint_min_sdk_version", "lint_min_sdk_version",
"lint_suppressions_dep",
"lint_suppressions_file", "lint_suppressions_file",
"lint_suppressions_dep",
"min_sdk_version", "min_sdk_version",
"proguard_android_sdk_dep", "proguard_android_sdk_dep",
"sign_bundle", "sign_bundle",
...@@ -104,8 +105,14 @@ template("chrome_bundle") { ...@@ -104,8 +105,14 @@ template("chrome_bundle") {
# Use a consistent baseline so that it is easy to regenerate by deleting the # Use a consistent baseline so that it is easy to regenerate by deleting the
# file and re-building the "android_lint" target. # file and re-building the "android_lint" target.
if (defined(invoker.enable_lint) && invoker.enable_lint) { if (defined(enable_lint) && enable_lint) {
lint_baseline_file = "//chrome/android/expectations/lint-baseline.xml" if (!defined(lint_baseline_file)) {
lint_baseline_file = "//chrome/android/expectations/lint-baseline.xml"
}
if (!defined(lint_suppressions_file)) {
lint_suppressions_file =
"//chrome/android/expectations/lint-suppressions.xml"
}
} }
# List of DFMs that are installed by default by wrapper scripts, to make # List of DFMs that are installed by default by wrapper scripts, to make
......
...@@ -646,6 +646,8 @@ if (is_android) { ...@@ -646,6 +646,8 @@ if (is_android) {
android_apk("cast_shell_apk") { android_apk("cast_shell_apk") {
enable_lint = true enable_lint = true
lint_baseline_file = "android/lint-baseline.xml"
lint_suppressions_file = "android/lint-suppressions.xml"
apk_name = "CastShell" apk_name = "CastShell"
android_manifest = "$root_gen_dir/cast_shell_manifest/AndroidManifest.xml" android_manifest = "$root_gen_dir/cast_shell_manifest/AndroidManifest.xml"
......
sanfin@chromium.org sanfin@chromium.org
per-file lint-*.xml=*
# COMPONENT: Chromecast # COMPONENT: Chromecast
<?xml version="1.0" encoding="UTF-8"?>
<issues format="5" by="lint 4.0.1" client="cli" variant="all" version="4.0.1">
<issue
id="InlinedApi"
message="Field requires API level 25 (current min is 21): `android.provider.Settings.Global#DEVICE_NAME`"
errorLine1=" private static final String DEVICE_NAME_SETTING_KEY = Settings.Global.DEVICE_NAME;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="../../chromecast/base/java/src/org/chromium/chromecast/base/CastSettingsManager.java"
line="37"
column="59"/>
</issue>
<issue
id="InflateParams"
message="Avoid passing `null` as the view root (needed to resolve layout parameters on the inflated layout&apos;s root element)"
errorLine1=" .inflate(R.layout.cast_web_contents_activity, null);"
errorLine2=" ~~~~">
<location
file="../../chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsFragment.java"
line="68"
column="87"/>
</issue>
<issue
id="InflateParams"
message="Avoid passing `null` as the view root (needed to resolve layout parameters on the inflated layout&apos;s root element)"
errorLine1=" .inflate(R.layout.cast_web_contents_activity, null),"
errorLine2=" ~~~~">
<location
file="../../chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsView.java"
line="50"
column="71"/>
</issue>
<issue
id="MissingVersion"
message="Should set `android:versionCode` to specify the application version"
errorLine1="&lt;manifest package=&quot;org.chromium.chromecast.shell&quot; xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;>"
errorLine2=" ~~~~~~~~">
<location
file="gen/chromecast/cast_shell_apk__lint/gen/cast_shell_manifest/AndroidManifest.xml"
line="2"
column="2"/>
</issue>
<issue
id="MissingVersion"
message="Should set `android:versionName` to specify the application version"
errorLine1="&lt;manifest package=&quot;org.chromium.chromecast.shell&quot; xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;>"
errorLine2=" ~~~~~~~~">
<location
file="gen/chromecast/cast_shell_apk__lint/gen/cast_shell_manifest/AndroidManifest.xml"
line="2"
column="2"/>
</issue>
<issue
id="Overdraw"
message="Possible overdraw: Root element paints background `#FFFFFF` with a theme that also paints a background (inferred theme is `@style/CastShellTheme`)"
errorLine1=" android:background=&quot;#FFFFFF&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="../../chromecast/browser/android/apk/res/layout/cast_web_contents_activity.xml"
line="12"
column="5"/>
</issue>
<issue
id="RtlEnabled"
message="The project references RTL attributes, but does not explicitly enable or disable RTL support with `android:supportsRtl` in the manifest">
<location
file="gen/chromecast/cast_shell_apk__lint/gen/cast_shell_manifest/AndroidManifest.xml"/>
</issue>
</issues>
<?xml version="1.0" encoding="utf-8" ?>
<lint>
<!-- Ignore all lint errors in chrome code. -->
<issue id="all">
<ignore regexp="../../base/"/>
<ignore regexp="../../components/"/>
<ignore regexp="../../content/"/>
<ignore regexp="../../device/"/>
<ignore regexp="../../media/"/>
<ignore regexp="../../net/"/>
<ignore regexp="../../services/"/>
<ignore regexp="../../ui/"/>
</issue>
<!-- The following cast-specific suppressions have been migrated from
//build/android/lint/suppressions.xml -->
<issue id="ContentDescription" severity="Error">
<ignore regexp="chromecast/internal"/>
</issue>
<issue id="HandlerLeak">
<ignore regexp="chromecast/internal"/>
</issue>
<issue id="HardcodedText" severity="Error">
<ignore regexp="chromecast/internal"/>
</issue>
<issue id="IconDensities">
<ignore regexp="chromecast/internal"/>
</issue>
<issue id="IconDipSize">
<ignore regexp="chromecast/internal"/>
</issue>
<issue id="IconDuplicates" severity="Error">
<!-- mipmap version is used for app launcher only. drawables used for notifications -->
<ignore regexp="chromecast/browser/android/apk/res/mipmap-.*/app_icon.png"/>
<ignore regexp="chromecast/internal"/>
</issue>
<issue id="IconDuplicatesConfig" severity="Error">
<ignore regexp="chromecast/internal"/>
</issue>
<issue id="IconLauncherShape" severity="Error">
<ignore regexp="chromecast/internal"/>
</issue>
<issue id="IconLocation">
<ignore regexp="chromecast/internal"/>
</issue>
<issue id="IconMissingDensityFolder">
<ignore regexp="chromecast/internal"/>
</issue>
<issue id="MissingTranslation">
<!-- http://crbug.com/450548 -->
<ignore regexp="chromecast/internal"/>
</issue>
<issue id="SpUsage" severity="Error">
<ignore regexp="chromecast/internal"/>
</issue>
<issue id="TextFields" severity="Error">
<ignore regexp="chromecast/internal"/>
</issue>
<issue id="UnusedResources">
<!-- 1 resource used by android tv to generate resources.zip file -->
<ignore regexp="chromecast/internal/shell/browser/android/java/res/drawable-hdpi/ic_settings_cast.png"/>
</issue>
<issue id="UselessParent">
<ignore regexp="chromecast/internal"/>
</issue>
</lint>
...@@ -1021,6 +1021,8 @@ if (!is_component_build) { ...@@ -1021,6 +1021,8 @@ if (!is_component_build) {
# This is the only Cronet APK with lint enabled. This one was chosen because # This is the only Cronet APK with lint enabled. This one was chosen because
# it depends on basically all source files. # it depends on basically all source files.
enable_lint = true enable_lint = true
lint_suppressions_file = "lint-suppressions.xml"
apk_name = "CronetTestInstrumentation" apk_name = "CronetTestInstrumentation"
android_manifest = "test/javatests/AndroidManifest.xml" android_manifest = "test/javatests/AndroidManifest.xml"
min_sdk_version = _cronet_min_sdk_version min_sdk_version = _cronet_min_sdk_version
......
<?xml version="1.0" encoding="utf-8" ?>
<lint>
<!-- Ignore all lint errors in chrome code. -->
<issue id="all">
<ignore regexp="../../base/"/>
<ignore regexp="../../net/"/>
<ignore regexp="../../testing/"/>
</issue>
</lint>
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
found in the LICENSE file. found in the LICENSE file.
--> -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.chromium.net.tests"> package="org.chromium.net.tests"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.RUN_INSTRUMENTATION" /> <uses-permission android:name="android.permission.RUN_INSTRUMENTATION" />
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
......
...@@ -147,6 +147,8 @@ remoting_android_client_java_tmpl("remoting_android_client_java") { ...@@ -147,6 +147,8 @@ remoting_android_client_java_tmpl("remoting_android_client_java") {
remoting_apk_tmpl("remoting_apk") { remoting_apk_tmpl("remoting_apk") {
enable_lint = true enable_lint = true
lint_baseline_file = "lint-baseline.xml"
lint_suppressions_file = "lint-suppressions.xml"
apk_name = "Chromoting" apk_name = "Chromoting"
sources = [ "//remoting/android/apk/src/org/chromium/chromoting/RemotingApplication.java" ] sources = [ "//remoting/android/apk/src/org/chromium/chromoting/RemotingApplication.java" ]
......
...@@ -3,3 +3,5 @@ ...@@ -3,3 +3,5 @@
joedow@chromium.org joedow@chromium.org
lambroslambrou@chromium.org lambroslambrou@chromium.org
yuweih@chromium.org yuweih@chromium.org
per-file lint-*.xml=*
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="{{ APK_PACKAGE_NAME }}"> package="{{ APK_PACKAGE_NAME }}"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /> <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" /> <uses-feature android:glEsVersion="0x00020000" android:required="true" />
......
This diff is collapsed.
<?xml version="1.0" encoding="utf-8" ?>
<lint>
<!-- Ignore all lint errors in chrome code. -->
<issue id="all">
<ignore regexp="../../base/"/>
<ignore regexp="../../net/"/>
<ignore regexp="../../ui/"/>
</issue>
<!-- The following remoting-specific suppressions have been migrated from
//build/android/lint/suppressions.xml -->
<issue id="ButtonStyle" severity="Error">
<ignore regexp="remoting/android/host/res/layout/main.xml"/>
</issue>
<issue id="HandlerLeak">
<ignore regexp="remoting/android/java/src/org/chromium/chromoting/TapGestureDetector.java"/>
</issue>
<issue id="HardcodedText" severity="Error">
<ignore regexp="remoting/android/host/res/layout/main.xml"/>
</issue>
<issue id="MissingSuperCall" severity="Error">
<!-- TODO(wnwen): File bug to fix -->
<ignore regexp="remoting/android/java/src/org/chromium/chromoting/Chromoting.java"/>
</issue>
<issue id="MissingTranslation">
<ignore regexp="remoting/resources/strings_java.resources.zip"/>
</issue>
<issue id="UnusedResources">
<!-- 1: raw resources are accessed by URL in various places -->
<ignore regexp="gen/remoting/android/.*/res/raw/credits.*"/>
</issue>
</lint>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment