aboutsummaryrefslogtreecommitdiffstats
path: root/lint
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Add lint detector for suspicious 0dp sizes"Tor Norbye2012-10-294-1/+223
|\
| * Add lint detector for suspicious 0dp sizesTor Norbye2012-10-274-1/+223
| | | | | | | | Change-Id: I5c60ae929a70c3040dfff9e319aa5175580b86c7
* | Support theme attributes not explicitly including "attr"Tor Norbye2012-10-261-8/+2
|/ | | | Change-Id: I4b86001374285c9043f816af515ebf3ce2ff233c
* Merge "38958: Lint misreports missing layout_[width/height]"Tor Norbye2012-10-263-0/+45
|\
| * 38958: Lint misreports missing layout_[width/height]Tor Norbye2012-10-263-0/+45
| | | | | | | | Change-Id: I21c88f01ef7ae2b846f67533900eea7e8161266a
* | Merge "Update compiler flags."Tor Norbye2012-10-263-6/+6
|\ \ | |/ |/|
| * Update compiler flags.Tor Norbye2012-10-263-6/+6
| | | | | | | | | | | | | | | | | | | | Turns off the ability to use @SuppressWarnings with optional errors is available, but off by default (see Eclipse issue 392875). This turns that off, makes missing enums in switch statements a warning, and synchronizes the settings file to all projects (except tests.) Change-Id: Iad7060523b6ee2cbbca97e0a6ffedb264b185222
* | Regression test for 38195Tor Norbye2012-10-262-0/+48
|/ | | | Change-Id: Ida9a68e932d4c47878d519129262fe1d2794c4ea
* Merge "38700: wrong reporting of <requestFocus /> as missing size"Tor Norbye2012-10-222-8/+15
|\
| * 38700: wrong reporting of <requestFocus /> as missing sizeTor Norbye2012-10-192-8/+15
| | | | | | | | Change-Id: I93154fbe3c0d86b6767ef2283ecbc5038163c604
* | Merge "38748: lint doesn't recognise inputtype in style"Tor Norbye2012-10-222-0/+18
|\ \
| * | 38748: lint doesn't recognise inputtype in styleTor Norbye2012-10-222-0/+18
| | | | | | | | | | | | Change-Id: Ia00b9d6de3feb1b3dc99b8293c456e5b26e1b860
* | | Merge "Fix handling of @SuppressLint on fields"Tor Norbye2012-10-2217-34/+157
|\ \ \ | |/ / |/| |
| * | Fix handling of @SuppressLint on fieldsTor Norbye2012-10-1817-34/+157
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Fix incorrect assertion"Xavier Ducrohet2012-10-191-1/+1
|\ \
| * | Fix incorrect assertionTor Norbye2012-10-191-1/+1
| | | | | | | | | | | | Change-Id: Id110d90b173d052b952f90622bcbff64f5bedbe5
* | | Merge "Fix UTF-8 encoding in some tests"Xavier Ducrohet2012-10-192-4/+5
|\ \ \ | |/ /
| * | Fix UTF-8 encoding in some testsTor Norbye2012-10-192-4/+5
| |/ | | | | | | Change-Id: Ia815a807db6d9b65f7852a4b8ae614fc69f510fe
* | Update maven artifacts and add lint.Xavier Ducrohet2012-10-195-29/+289
|/ | | | | | | | | Updated the groupId of most artifacts to be more reflective of their sub-projects status in the SDK tools. Added lint artifacts. Change-Id: I900a165647a9b7d3c55b473f63c4ca4469762d7b
* 32849: Fix CRLF line ending handling in the partial formatterTor Norbye2012-10-176-2/+210
| | | | | | | | | | | | | | | | | | Fix the handling of \r characters in the code which applies formatting deltas into existing documents. It could end up inserting the formatted portion in the middle of a \r\n pair, which made Eclipse extremely confused (https://bugs.eclipse.org/bugs/show_bug.cgi?id=375421) This fixes 32849: Eclipse android adt xml editing artifacting (unsynced) lines of text when changes are made in the graphical interface It also adds a lint check to identify *existing* files that already have these mangled line endings, along with a quickfix to make the correction. Change-Id: I1e7024f2786e4cb0233c2c6b98c3d3f942703ea0
* Warn about potentially accidentally overriding methodsTor Norbye2012-10-1612-5/+401
| | | | Change-Id: Ic8d20a002f6225cb15f609b3b7582716904e9278
* Add lint support for checking frameworks/base/coreTor Norbye2012-10-166-11/+107
| | | | | | | | | | This changeset adds basic support for running lint against the AOSP frameworks/base/core codebase. It also makes the resource folder provided by the lint client. Change-Id: I7e38b0925cb032f776c54f975b924b91d6ab7a24
* Fix required attribute check for GridLayout childrenTor Norbye2012-10-161-6/+9
| | | | Change-Id: I58e67eb1acb6b8e5a503f1aa7822c97b545eac10
* Remove debug printlnTor Norbye2012-10-161-6/+0
| | | | Change-Id: Icae211bc8c95b1acfbd84f382754755487876af2
* Check for missing layout_width and layout_height attributesTor Norbye2012-10-1617-56/+851
| | | | | | | | Also looks at style declarations and attributes on include tags to allow elements to either pick up sizes from styles or from the including context. Change-Id: I91a944805d8a906ff63b5a22f2faa876e7292c19
* Make view cast detector handle multiple typesTor Norbye2012-10-154-25/+121
| | | | Change-Id: I375ebc368a0173e78fd8aae1c6fc658c4ec5416d
* Look for missing android namespace prefix in manifest filesTor Norbye2012-10-153-10/+77
| | | | | | | | Extend the missing prefix checker such that it doesn't only look at layout files, but also complains in manifest files, menu files, drawable files, etc. Change-Id: Ifbd7635e3b73d662aa6c7a4e03e4c2894c6fe204
* Misc improvements to the multi-configuration editingTor Norbye2012-10-152-88/+3
| | | | | | | | | | | | | * Fix bug in switching to preview configurations * Don't draw drop shadows for thumbnails in Dialog themes * Move the preview title labels to sit above each preview thumbnail * Make error thumbnails include rendering error messages (and wrap if necessary), plus tweak appearance * Make switch animation show rectangles animating in both directions Change-Id: I0995617fa277b48419a88c5203abf5b1d49af711
* Lint detector for missing menu titlesTor Norbye2012-10-154-1/+185
| | | | | | | As requested in 38022: Lint should warn when menus don't have a title Change-Id: I34688d7733d98ba9fa8cc10202a5470040962117
* 37329: lint checks for conflicting permission definitionTor Norbye2012-10-157-3/+169
| | | | Change-Id: I3b131872cc9938ceb5df271ab10ec60644d44b26
* Merge "Added a lint checker to flag permissions that are only granted to ↵Tor Norbye2012-10-104-1/+596
|\ | | | | | | system applications"
| * Added a lint checker to flag permissions that are only granted to system ↵Sebastian Porst2012-10-094-1/+596
| | | | | | | | | | | | applications Change-Id: If423ad3c477dbad9011b600e5c8d8773963d27b9
* | 38325: onClick XML attribute with @string resource not recognisedTor Norbye2012-10-102-1/+8
|/ | | | | | | | | | Don't flag onClick handlers as missing when they are using resource name indirections. Also make the Go To Declaration hyperlink work for tools:context links to activities. Change-Id: Ie26cefd2cebef32e955e3031da707654f3dc7e06
* Fix API check for theme references in XMLTor Norbye2012-10-053-1/+44
| | | | | | | Dots in resource names are replaced by underlines by aapt. Change-Id: Ica8244016c050327013103dfb4c60d960e9199c5
* Find mismatches between EditText inputType and nameTor Norbye2012-10-054-5/+396
| | | | | | | | | This adds a lint check which looks at the id of an EditText, and if it looks like it has a specific purpose (e.g. password or e-mail or number or phone etc) then it checks that the corresponding inputType matches. Change-Id: Ib40d3e47c88ea01ccbad61f3a24d9b9a4e79d5c6
* Check notification and action bar iconsTor Norbye2012-10-0511-77/+739
| | | | | | | These icons should not use color (and in the case of notification icons, be white). Change-Id: I32b9422735830a01bb069b90a5ad5a76d7aeb5de
* Fix misc lint bugsTor Norbye2012-10-0411-7/+94
| | | | | | | I ran lint over some large projects and manually verified the report; this uncovered a couple of false positives. Change-Id: I006d64a03119c6badc40e33df9ab4079e07dc7c5
* Fix lint bytecode to source code position mapping for innerclassesTor Norbye2012-10-034-17/+44
| | | | | | | | This fixes 38113: Lint doesn't show all NewApi errors in Eclipse, although it's showing on command line Change-Id: I0e1a8ffeac4d0ca085f59f80f86fd6eb7289ed4d
* 38002: Lint WakeLock Check Ignores Try-FinallyTor Norbye2012-10-014-3/+36
| | | | Change-Id: I4009ef5ffabedaa43158991657068edcaa6e80e0
* 38004: Lint Misreports API Compatibility of SQLiteCloseableTor Norbye2012-10-015-1/+58
| | | | Change-Id: I88cf62dec8671a8f053414f782bcb2cac617dc15
* Cache applicable issue lists per scope setTor Norbye2012-09-277-19/+197
| | | | | | | | | | Keep sets of applicable issues for each scope set. This should make incremental lint slightly more efficient. Also add a check that icon file extensions match the actual file format. Change-Id: I4a7f5e19b91aa3613480aa831ec42065528f02d3
* Add detector for fragments missing idsTor Norbye2012-09-265-2/+153
| | | | | | See issue 35959 for background. Change-Id: I8042b42e4649163cf8e6974d074ac05777685766
* 37861: Lint should warn when using mm or in unitsTor Norbye2012-09-265-21/+83
| | | | Change-Id: I220112559c1a7f30c505551b41004560b6e89891
* Merge "37702: InconsistentArrays fails to identify inconsistent arrays"Tor Norbye2012-09-264-30/+75
|\
| * 37702: InconsistentArrays fails to identify inconsistent arraysTor Norbye2012-09-254-30/+75
| | | | | | | | Change-Id: I47d3757cac4b9204bdb15a84a8679921adc049a3
* | 37733: TargetAPI doesn't fails to report unsupported APITor Norbye2012-09-252-3/+79
|/ | | | | | | Make incremental lint in source files use the Eclipse context to find super classes. Change-Id: I31af7a146c259875857026bc7721294205482a91
* Don't flag missing classes if project has not been built yetTor Norbye2012-09-242-1/+19
| | | | | | | | | | | | | | | The missing class detector in lint will warn if the manifest file contains references to class files and lint does not see those class files in the class output folder (or in any of the library jars). This is useful for catching typos and deleted classes. However, if you run lint on a project that has not yet been built, this can give misleading or confusing errors, since lint decides that a class exists by whether a .class file is actually there, not by whether a source file exists which would result in a class file getting produced with that name. Change-Id: I3105157a37f575e00b550ba90d883f24c02c16a9
* Fix missing class detector to work for incremental manifest editsTor Norbye2012-09-243-3/+41
| | | | | | | | | | | | | The missing manifest detector provides multiple issues; both the missing class detector (which requires not just manifest scope but also class scope), as well as some checks to ensure that for example inner classes are registered correctly, which only requires manifest scope. Because of this second issue, the detector runs in incremental manifest editing context, but the code to handle missing classes would also run. The check is simple; don't check missing class references unless we also have class scope. Change-Id: Iff83c372abf2335e3d8e991740702d6094fd65bd
* Add allowBackup lint security checkTor Norbye2012-09-215-1/+126
| | | | Change-Id: I3b79bef6981d880fe6a545429754e03bd384645c
* Rename ide_common to sdk_commonSiva Velusamy2012-09-181-1/+1
| | | | Change-Id: I1b39ee439a532f3f6758be35b569948e2e906665