aboutsummaryrefslogtreecommitdiffstats
path: root/lint/libs/lint_checks/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge "Add lint check for cut & paste errors in findViewById calls"Tor Norbye2012-11-284-36/+244
|\
| * Add lint check for cut & paste errors in findViewById callsTor Norbye2012-11-274-36/+244
| | | | | | | | Change-Id: Ie8ff6629a3e787587516f6fa88c70dfdb7a92d0d
* | Add support for specifying default language in res/valuesTor Norbye2012-11-283-6/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-285-4/+18
|\ \
| * | Fix 40136: Lint "tools:ignore" does not work in xmlTor Norbye2012-11-285-4/+18
| | | | | | | | | | | | | | | | | | | | | Also fix suppress check for a couple of different detectors. Also fix typo in TooManyViewsDetector (issue 40496). Change-Id: Ia2e90ceea0dcae749581bd5704d169c5b2b3f1b6
* | | Merge "40424: Wakelock Release check not quite correct"Tor Norbye2012-11-281-0/+19
|\ \ \ | |_|/ |/| |
| * | 40424: Wakelock Release check not quite correctTor Norbye2012-11-261-0/+19
| | | | | | | | | | | | Change-Id: I1ad6483a23728b0896d4824feba533e2f607e8c5
* | | Add lint launcher icon shape checkTor Norbye2012-11-272-2/+84
| | | | | | | | | | | | Change-Id: I789e74b667afbaea4089a62060b7138dadd8da6b
* | | Add lint comment checkerTor Norbye2012-11-272-1/+199
| | | | | | | | | | | | Change-Id: I5ba847838e0035ab8ad44967779fdf814d1901a6
* | | Merge "Warn about custom namespaces on builtin tags"Tor Norbye2012-11-271-0/+18
|\ \ \
| * | | Warn about custom namespaces on builtin tagsTor Norbye2012-11-161-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-272-1/+37
|\ \ \ \ | |/ / /
| * | | Add lint check for making dynamic text views selectableTor Norbye2012-11-163-2/+38
| | | | | | | | | | | | | | | | Change-Id: I9cc31e8b3094f830e785b96b46f384206074703c
* | | | Merge "Warn when mising contentDescription and hint"Tor Norbye2012-11-271-1/+31
|\ \ \ \ | |/ / /
| * | | Warn when mising contentDescription and hintTor Norbye2012-11-161-1/+31
| | | | | | | | | | | | | | | | Change-Id: I5321ba5a82c6ae2383412ecc01060f4b0d2a1c25
* | | | Merge "Add lint warning for small text"Tor Norbye2012-11-272-5/+55
|\ \ \ \ | |/ / /
| * | | Add lint warning for small textTor Norbye2012-11-162-5/+55
| | | | | | | | | | | | | | | | Change-Id: I731dd46de5275911313c772e18fde530415391db
* | | | Merge "39477: Detect mixing .png and .xml drawable assets"Tor Norbye2012-11-272-4/+109
|\ \ \ \ | |/ / /
| * | | 39477: Detect mixing .png and .xml drawable assetsTor Norbye2012-11-162-4/+109
| | | | | | | | | | | | | | | | Change-Id: Ieae4098cc5ea65ef4a38ffb788b1755a62312da8
* | | | Merge "Add lint detector finding duplicate resource definitions"Tor Norbye2012-11-272-1/+168
|\ \ \ \ | |/ / / | | | / | |_|/ |/| |
| * | Add lint detector finding duplicate resource definitionsTor Norbye2012-11-162-1/+168
| |/ | | | | | | Change-Id: I03d90622f0eedf8121c1a8c32600a5be6bfae1a4
* | Merge "39758: lint gripes about an OK format string"Tor Norbye2012-11-201-5/+20
|\ \
| * | 39758: lint gripes about an OK format stringTor Norbye2012-11-201-5/+20
| |/ | | | | | | Change-Id: I4a2f9a0a2bb9eb0a3368b4595e040458fadf8e74
* | Merge "39601: PxUsage shouldn't flag 0px"Tor Norbye2012-11-201-2/+2
|\ \
| * | 39601: PxUsage shouldn't flag 0pxTor Norbye2012-11-201-2/+2
| |/ | | | | | | Change-Id: I87d24b9d9435656957d32ac16fef06af592e85e5
* | Issue 39599: Fix typo detector to handle escapesTor Norbye2012-11-202-11/+38
|/ | | | | | | | | 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-071-2/+16
|\
| * Make hardcoded text detector also check menu filesTor Norbye2012-11-071-2/+16
| | | | | | | | Change-Id: I1b11d5e6650434fd5e57af05ff86b2d66a0a84db
* | Refine labelFor check: don't warn when hint is setTor Norbye2012-11-071-0/+4
|/ | | | Change-Id: I397dc73b9ab9f13b142b8e38dbb328fff14cc50e
* 39030: Incorrect NewAPI Lint warning: check local methodsTor Norbye2012-11-071-0/+23
| | | | Change-Id: I8b22fbb29e014fb3efb434f33924d831003d41ee
* Merge "Make /sdcard detector also flag /data/data/ references"Tor Norbye2012-11-071-7/+24
|\
| * Make /sdcard detector also flag /data/data/ referencesTor Norbye2012-11-071-7/+24
| | | | | | | | Change-Id: If08b99370a32eaa256e9cb63939428480d563bfe
* | Merge "39228: Validation for custom namespace in XMLs"Tor Norbye2012-11-071-0/+20
|\ \
| * | 39228: Validation for custom namespace in XMLsTor Norbye2012-11-021-0/+20
| | | | | | | | | | | | Change-Id: Ie71f8a4706b1b91a84903257aca1adda461c277f
* | | Merge "39134: forgot to call commit() after editing a SharedPreference"Tor Norbye2012-11-071-18/+91
|\ \ \ | |_|/ |/| |
| * | 39134: forgot to call commit() after editing a SharedPreferenceTor Norbye2012-10-311-18/+91
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Don't warn about missing classes before a build"Tor Norbye2012-11-021-1/+3
|\ \ \
| * | | Don't warn about missing classes before a buildTor Norbye2012-11-021-1/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Fix the --showall flag to work with all the icon issuesTor Norbye2012-11-011-3/+6
|/ | | | Change-Id: I6c06889e26dc7c5e610069c71f58f81ffa6294a8
* Merge "Add lint detector for suspicious 0dp sizes"Tor Norbye2012-10-292-1/+96
|\
| * Add lint detector for suspicious 0dp sizesTor Norbye2012-10-272-1/+96
| | | | | | | | Change-Id: I5c60ae929a70c3040dfff9e319aa5175580b86c7
* | Support theme attributes not explicitly including "attr"Tor Norbye2012-10-261-8/+2
|/ | | | Change-Id: I4b86001374285c9043f816af515ebf3ce2ff233c
* 38958: Lint misreports missing layout_[width/height]Tor Norbye2012-10-261-0/+31
| | | | Change-Id: I21c88f01ef7ae2b846f67533900eea7e8161266a
* Merge "38700: wrong reporting of <requestFocus /> as missing size"Tor Norbye2012-10-221-8/+6
|\
| * 38700: wrong reporting of <requestFocus /> as missing sizeTor Norbye2012-10-191-8/+6
| | | | | | | | Change-Id: I93154fbe3c0d86b6767ef2283ecbc5038163c604
* | Merge "38748: lint doesn't recognise inputtype in style"Tor Norbye2012-10-221-0/+11
|\ \
| * | 38748: lint doesn't recognise inputtype in styleTor Norbye2012-10-221-0/+11
| | | | | | | | | | | | Change-Id: Ia00b9d6de3feb1b3dc99b8293c456e5b26e1b860
* | | Merge "Fix handling of @SuppressLint on fields"Tor Norbye2012-10-2210-16/+40
|\ \ \ | |/ / |/| |
| * | Fix handling of @SuppressLint on fieldsTor Norbye2012-10-1810-16/+40
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you have a field initialization like this: private int foo = new ForbiddenClass(); the actual code to perform the initialization lives in a method named <init> (or for a static field, <clinit>). If you tried to suppress lint errors here by adding an annotation on the field, it would not be found by lint, since lint looks at method level annotations and it's sitting on the field node instead. To fix this, the suppress check needs to identify the field scenario, and in that case (when checking whether an error is suppressed) look up the field in the class and check annotations there. There was a second bug: The lint check which looks for invalid suppress annotation sites (since they're not allowed on local variables for class based lint checks) incorrectly concluded that these types of initializations were local variables rather than field initializations. This fixes issue 38626: ADT: Misleading lint rule: SimpleDateFormat Change-Id: I254f3fb5a6132d6cbe39bd425ffe6d67ed7b84ed