aboutsummaryrefslogtreecommitdiffstats
path: root/lint/libs/lint_api/src/main/java/com/android
Commit message (Collapse)AuthorAgeFilesLines
* Remove source of prebuilts.Raphael Moll2013-02-0632-11976/+0
| | | | | | Sources are now located in tools/base.git. Change-Id: I9cbe1deb98f8c43e90f5fb04b668f664b9850620
* Allow "all" to be used in the lint.xml file to match all issuesTor Norbye2013-01-281-0/+9
| | | | Change-Id: Ieedd879648883fb2d1a2eed571b690f3280a1850
* Lint tweaksTor Norbye2013-01-222-10/+16
| | | | | | | | Fix missing dispose() call for manifest files, and add a method to the TypographyDetector such that clients don't need a DOM node to look up the suggested replacement. Change-Id: If048a62a6b0b1c8af83a3e0b62a28876d4449764
* Fix other file visitor to handle incremental analysis properlyTor Norbye2013-01-222-26/+92
| | | | | | | | | | | The other file visitor would unconditionally scan the full project contents for each scope, even when project.getSubset() (used for incremental analysis in IDEs) was non null. Also avoid NPE when lint is scanning a java file without a package declaration. Change-Id: I74e813b41c2e32acac879b277dc974619156adbd
* Add support for checking lint on other filesTor Norbye2013-01-147-9/+249
| | | | | | | | | | This adds a new scope, Scope.OTHER, which can be used to indicate that the check wants to investigate files other than the ones specially handled as XML, Java, manifest or ProGuard files. The PrivateKeyDetector now uses this such that it doesn't have to perform its own directory iteration. Change-Id: Ic38bf2db656f00c01d94c0c4e0112bc77218ea08
* Make resource folders customizeableTor Norbye2013-01-043-20/+22
| | | | | | | | | | | | | | | | Until now, lint has hardcoded where the project resources are to be found: in $project/res. With the new build system this will no longer necessarily be the case; there can be multiple resource folders, and the locations might not be just res/. Therefore, this CL generalizes lint's handling of resource folders: it is now provided by the LintClient, and the command line lint tool uses this to offer a new --resources flag which can be used to set the resource directory/directories for a project. Change-Id: I3717c6474141776ee5541d476f9bad5bb8e1a9c7
* Code cleanupTor Norbye2013-01-021-2/+6
| | | | | | | | Fix typos, remove redundant semicolons, fix incorrect names (using an m prefix where they should be using s, turn fields with constant names into actual constants), etc. Change-Id: I44a5ab82c1158007d0803d43ce14b361aff240b8
* Update fragment issue from warning to errorTor Norbye2013-01-021-3/+6
| | | | | | Also update constants to stay in sync with sdk/ version. Change-Id: I8e454a03d83c81036bf8cc73609babc96a9c7739
* 41753: Lint API Check: Consult source files for constantsTor Norbye2013-01-022-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lint currently checks the .class files for field references and method references to APIs that require a version higher than the minSdkVersion in the manifest. However, constants (such as final static integers) will be copied into the .class file, so there is no reference to the original API and its API version, which means lint can't flag these. In some cases, such as referencing LayoutParams.MATCH_PARENT, that's no problem; the constant value works on older versions, and there is no problem, since the value rather than the reference is used. However, in other cases this may lead to runtime crashes. This CL updates lint to look at the source files and flag field references. It excludes some constants that are known to be okay (such as referencing say android.os.Build.VERSION_CODES.JELLY_BEAN_MR1 (which is typically done precisely to conditionally branch based on the current device's version). It also ignores usages as case constants or in conditional if checks. We may need to do additional tweaks to this in the future, since unlike method and field references there are probably many cases where referencing these constants are fine on older devices, but there are also cases where it's dangerous. For now, we're erring on the side of warning the developer rather than being certain that it's not a problem. Change-Id: Ieba4c15d7fdda02756b7b7f5a1b79f7698c1915b
* Prevent circular dependencies in library project dependenciesTor Norbye2012-12-214-8/+114
| | | | Change-Id: Ia43c2436e01032ace7e2b13e59d60d10f71e7004
* Code cleanupTor Norbye2012-12-1219-158/+135
| | | | | | | | Ran some static analysis on the lint code and fixed various issues - some typos, made some fields final, made some methods static, sorted modifier order etc. Change-Id: Ibdcdec5745f040eb7b0880cf6999c0f0ea7f7e6f
* Refactor lint folder structure.Xavier Ducrohet2012-12-0630-0/+11556
Move folders around to match default gradle/maven folder structure. The custom structure confused some IDEs when importing the project as a Gradle project. Change-Id: I5c059cc6fdf0ac2444b03d435f83f853363cfa32