aboutsummaryrefslogtreecommitdiffstats
path: root/lint/libs
Commit message (Collapse)AuthorAgeFilesLines
* Check for unsupported Java packagesTor Norbye2012-11-288-17/+480
| | | | | | | | | | | | | | | | | | | If you include a library in your class path which was not built as an Android project it's possible for it to include references to classes in the java.* and javax.* namespace which are not valid in Android. This changeset adds a new lint detector for this. It augments the API database used by the API Checker to record the set of platform packages, and to be able to quickly query whether an internal class reference is in one of the valid packages. The new lint check runs only on libraries (since tools will typically set up the right classpath to give immediate errors if you try to access invalid packages from your own code). This was requested in issue 39109. Change-Id: Id1ce7982e683bae9a484e7b75d7e77a256ca4414
* Add lint check ensuring that buttons in bars are borderlessTor Norbye2012-11-284-4/+186
| | | | Change-Id: Ie99e3e7b75f1ac8cf6447c70afc5901437e2d600
* Don't report missing layout_width/height if set in themeTor Norbye2012-11-284-3/+115
| | | | Change-Id: I48ecfea6304abedb942161bf2fec1d9867ddf0c6
* Merge "Add lint check for cut & paste errors in findViewById calls"Tor Norbye2012-11-288-37/+428
|\
| * Add lint check for cut & paste errors in findViewById callsTor Norbye2012-11-278-37/+428
| | | | | | | | Change-Id: Ie8ff6629a3e787587516f6fa88c70dfdb7a92d0d
* | Add support for specifying default language in res/valuesTor Norbye2012-11-2810-11/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset adds support for a tools:locale attribute in resource files where you can declare which language is actually the default. This is used both by the missing translation detector (such that it won't complain if for example values-en-rUS is intended to supplement res/values/), as well as the typo detector (to allow you to specify which language's dictionary should be used to look for typos in the default resource file.) This addresses 33845: lint is wrong about translation regions Change-Id: Icb16cf11407c333845b56b6d105c99a8661430b0
* | Merge "Fix 40136: Lint "tools:ignore" does not work in xml"Tor Norbye2012-11-2813-7/+197
|\ \
| * | Fix 40136: Lint "tools:ignore" does not work in xmlTor Norbye2012-11-2813-9/+203
| | | | | | | | | | | | | | | | | | | | | Also fix suppress check for a couple of different detectors. Also fix typo in TooManyViewsDetector (issue 40496). Change-Id: Ia2e90ceea0dcae749581bd5704d169c5b2b3f1b6
* | | Merge "Add sdktestutils package and consolidate some test utility code"Tor Norbye2012-11-285-128/+29
|\ \ \
| * | | Add sdktestutils package and consolidate some test utility codeTor Norbye2012-11-265-128/+29
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL creates a new project, sdk/testutils, which is added to the test projects for ADT and lint. It contains various test utility code, some from ADT tests, some from lint tests, and some duplicated in both, and some new utility code such as a better diff-er. The CL also updates a bunch of tests; many golden files are updated to the new test file diff output format, and some golden files were out of date, and in a couple of cases I fixed some bugs I noticed in the output. Change-Id: I98c49c929916ae9bad24db45602e10ded6c526da
* | | Merge "40424: Wakelock Release check not quite correct"Tor Norbye2012-11-284-0/+55
|\ \ \ | |_|/ |/| |
| * | 40424: Wakelock Release check not quite correctTor Norbye2012-11-264-0/+55
| | | | | | | | | | | | Change-Id: I1ad6483a23728b0896d4824feba533e2f607e8c5
* | | Add lint launcher icon shape checkTor Norbye2012-11-274-2/+96
| | | | | | | | | | | | Change-Id: I789e74b667afbaea4089a62060b7138dadd8da6b
* | | Add lint comment checkerTor Norbye2012-11-274-1/+266
| | | | | | | | | | | | Change-Id: I5ba847838e0035ab8ad44967779fdf814d1901a6
* | | Merge "Warn about custom namespaces on builtin tags"Tor Norbye2012-11-274-6/+44
|\ \ \
| * | | Warn about custom namespaces on builtin tagsTor Norbye2012-11-164-6/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL adds a lint check which flags using unknown namespaces on non custom views. Change-Id: I5d53635e5e0ea7be774f90c07103f1defae97980
* | | | Merge "Add lint check for making dynamic text views selectable"Tor Norbye2012-11-274-7/+58
|\ \ \ \ | |/ / /
| * | | Add lint check for making dynamic text views selectableTor Norbye2012-11-165-8/+59
| | | | | | | | | | | | | | | | Change-Id: I9cc31e8b3094f830e785b96b46f384206074703c
* | | | Merge "Warn when mising contentDescription and hint"Tor Norbye2012-11-273-4/+39
|\ \ \ \ | |/ / /
| * | | Warn when mising contentDescription and hintTor Norbye2012-11-163-4/+39
| | | | | | | | | | | | | | | | Change-Id: I5321ba5a82c6ae2383412ecc01060f4b0d2a1c25
* | | | Merge "Add lint warning for small text"Tor Norbye2012-11-274-6/+85
|\ \ \ \ | |/ / /
| * | | Add lint warning for small textTor Norbye2012-11-164-6/+85
| | | | | | | | | | | | | | | | Change-Id: I731dd46de5275911313c772e18fde530415391db
* | | | Merge "39477: Detect mixing .png and .xml drawable assets"Tor Norbye2012-11-273-7/+130
|\ \ \ \ | |/ / /
| * | | 39477: Detect mixing .png and .xml drawable assetsTor Norbye2012-11-163-7/+130
| | | | | | | | | | | | | | | | Change-Id: Ieae4098cc5ea65ef4a38ffb788b1755a62312da8
* | | | Merge "Add lint detector finding duplicate resource definitions"Tor Norbye2012-11-273-1/+231
|\ \ \ \ | |/ / / | | | / | |_|/ |/| |
| * | Add lint detector finding duplicate resource definitionsTor Norbye2012-11-163-1/+231
| |/ | | | | | | Change-Id: I03d90622f0eedf8121c1a8c32600a5be6bfae1a4
* | Merge "Lint fix for AOSP unbundled"Tor Norbye2012-11-201-0/+4
|\ \
| * | Lint fix for AOSP unbundledTor Norbye2012-11-201-0/+4
| |/ | | | | | | Change-Id: I306b753319d235b015f44c0927382578805898de
* | Merge "39758: lint gripes about an OK format string"Tor Norbye2012-11-204-5/+59
|\ \
| * | 39758: lint gripes about an OK format stringTor Norbye2012-11-204-5/+59
| |/ | | | | | | Change-Id: I4a2f9a0a2bb9eb0a3368b4595e040458fadf8e74
* | Merge "39601: PxUsage shouldn't flag 0px"Tor Norbye2012-11-202-2/+7
|\ \
| * | 39601: PxUsage shouldn't flag 0pxTor Norbye2012-11-202-2/+7
| |/ | | | | | | Change-Id: I87d24b9d9435656957d32ac16fef06af592e85e5
* | Issue 39599: Fix typo detector to handle escapesTor Norbye2012-11-204-13/+45
|/ | | | | | | | | Fix handling of escapes in the lint typo detector This fixes 39599: LINT 21: Type flags incorrectly Also fixes a description typo (issue 39554) Change-Id: I48e651f8a314b025dc31063d517de57e0419351a
* Merge "Make hardcoded text detector also check menu files"Tor Norbye2012-11-072-4/+37
|\
| * Make hardcoded text detector also check menu filesTor Norbye2012-11-072-4/+37
| | | | | | | | Change-Id: I1b11d5e6650434fd5e57af05ff86b2d66a0a84db
* | Refine labelFor check: don't warn when hint is setTor Norbye2012-11-072-0/+13
|/ | | | Change-Id: I397dc73b9ab9f13b142b8e38dbb328fff14cc50e
* 39030: Incorrect NewAPI Lint warning: check local methodsTor Norbye2012-11-075-1/+92
| | | | Change-Id: I8b22fbb29e014fb3efb434f33924d831003d41ee
* Merge "Make /sdcard detector also flag /data/data/ references"Tor Norbye2012-11-073-9/+39
|\
| * Make /sdcard detector also flag /data/data/ referencesTor Norbye2012-11-073-9/+39
| | | | | | | | Change-Id: If08b99370a32eaa256e9cb63939428480d563bfe
* | Merge "39228: Validation for custom namespace in XMLs"Tor Norbye2012-11-073-0/+46
|\ \
| * | 39228: Validation for custom namespace in XMLsTor Norbye2012-11-023-0/+46
| | | | | | | | | | | | Change-Id: Ie71f8a4706b1b91a84903257aca1adda461c277f
* | | Merge "38838: lint -fullpaths doesn't always work"Tor Norbye2012-11-072-0/+134
|\ \ \
| * | | 38838: lint -fullpaths doesn't always workTor Norbye2012-11-022-0/+134
| |/ / | | | | | | | | | Change-Id: I09500947973897b412b61da17284f04acb8ece20
* | | Merge "39134: forgot to call commit() after editing a SharedPreference"Tor Norbye2012-11-073-18/+176
|\ \ \
| * | | 39134: forgot to call commit() after editing a SharedPreferenceTor Norbye2012-10-313-18/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates the lint check to handle some additional scenarios around missing commit() calls for SharedPreference.Edit; in particular when using edit() on field references and in chained method calls. Change-Id: I1b249ed81ca9d0b0e1c85466ccfa1ecdd6c53fad
* | | | 39153: lint shows project folder instead of project nameTor Norbye2012-11-053-4/+40
| |_|/ |/| | | | | | | | Change-Id: I415c42e19573bf733de672625a1200e62204ec77
* | | Merge "Don't warn about missing classes before a build"Tor Norbye2012-11-022-1/+16
|\ \ \
| * | | Don't warn about missing classes before a buildTor Norbye2012-11-022-1/+16
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The missing class detector warns about classes declared in the manifest, but not found on disk. In order not to warn before you've built the project, it only does this if it has seen at least one class. However, it turned out that it would also look at library jars, such that a not-built project using the support library would be considered to have classes, and would therefore flag newly added activities. Change-Id: Iaf01fe3e3626bdb31d535c00aea584793d6f72b9
* | | Additional fixes to filter out library project lint warningsTor Norbye2012-11-0215-12/+84
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lint already has the concept of whether a project should report lint warnings or not; a project can be included in analysis (e.g. for unused resource checks), but can filter out any warnings local to that project. This is useful when you are using a library, but don't want to see errors from that library which may not be under your control. The way this is handled from the command line is that lint will only report errors for projects you've referenced; e.g. if you run "lint /foo/bar" this will show errors in /foo/bar, but exclude errors found in the library project /foo/bar/../library". However, there were several lint checks which needed additional fixes for this, because (like the unused error detector) they gather data from multiple projects and process and report in the after-project hook. In addition, inside Eclipse, the UI would always automatically include libraries. This is sometimes what you want, and sometimes not what you want, so this CL adds a new toggle menu item to the lint action menu, "Skip Library Project Dependencies", off by default, which you can select to make lint runs from eclipse include or exclude library projects in the report. Change-Id: Idf3167e818931525e0dd7661f5cdf3a3e69b6522
* | Unit tests for ignoring missing densities via lint.xmlTor Norbye2012-11-014-8/+63
| | | | | | | | Change-Id: I34d2b91dfa2c36b71c54ca9f83b2749b893a5b7c