aboutsummaryrefslogtreecommitdiffstats
path: root/lint
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Fix nested linear layout weights lint check"Tor Norbye2012-05-024-11/+53
|\
| * Fix nested linear layout weights lint checkTor Norbye2012-04-284-11/+53
| | | | | | | | | | | | | | See issue http://code.google.com/p/android/issues/detail?id=22889 Change-Id: Ifd27764c0bb3360e52abb3334bdbfef820d231f7
* | Add lint check to make sure SharedPreference editors are committedTor Norbye2012-04-275-2/+274
|/ | | | Change-Id: Ifacc8df1ef9169c57725652ae9d921ed2b3129bd
* Fix NPE in icon checkTor Norbye2012-04-271-0/+3
| | | | | | | Fix for http://code.google.com/p/android/issues/detail?id=27966 Change-Id: I1a3e538644044ee0c02cb729aca40e15f5b23d22
* Fix 29263: ExtraTranslation incorrectly flags string-arraysTor Norbye2012-04-234-0/+39
| | | | | | Fixes http://code.google.com/p/android/issues/detail?id=29263 Change-Id: Id4e247ce751bca9ff54311126d64e1fbd0bfb312
* Lint: Don't check match_parent versus fill_parent in api checkTor Norbye2012-04-092-16/+0
| | | | | | | | Those constants are tied to the build target, not the minimum or target SDK versions (so compilation will already complain if you're using a too old version.) Change-Id: I54376eb7c44f749e1494ff8a39987ec1aa6117ad
* Merge "28319: Lint ignores tools:ignore="InefficientWeight""Tor Norbye2012-04-053-1/+32
|\
| * 28319: Lint ignores tools:ignore="InefficientWeight"Tor Norbye2012-04-053-1/+32
| | | | | | | | Change-Id: Ic8bbb084b08a3f35c651959217ee3d24c8ae61c5
* | Merge "28321: Lint didn't warn about "new Long(long)""Tor Norbye2012-04-052-5/+10
|\ \
| * | 28321: Lint didn't warn about "new Long(long)"Tor Norbye2012-04-052-5/+10
| |/ | | | | | | Change-Id: I69d053e4242e0af2080fdd9ed233fd10c8963d1b
* | Merge "Fix issue 28201: Check API levels through static dispatch as well"Tor Norbye2012-04-054-0/+41
|\ \
| * | Fix issue 28201: Check API levels through static dispatch as wellTor Norbye2012-04-054-0/+41
| |/ | | | | | | | | | | | | This CL fixes issue 28201: Lint API Level checks fail when static methods are called without stating class name Change-Id: I9b9e92e1d5e17acad1d37d8fd2684f0321132281
* | Fix issue 28330: Gracefully handle corrupt .class filesTor Norbye2012-04-053-8/+37
|/ | | | Change-Id: Icf9c3cdd105f1edb653260e0a76419bcfc9ef83d
* Merge "27471: Lint check for match_parent vs fill_parent on older APIs"Tor Norbye2012-04-024-10/+39
|\
| * 27471: Lint check for match_parent vs fill_parent on older APIsTor Norbye2012-04-024-10/+39
| | | | | | | | Change-Id: I2ff5e88fce13f9016b27878ece2c45ea1b58ad7a
* | Merge "Fix 27966: Android lint null pointer crash"Tor Norbye2012-04-021-1/+1
|\ \
| * | Fix 27966: Android lint null pointer crashTor Norbye2012-04-021-1/+1
| |/ | | | | | | Change-Id: I3ea0ce70ab0a3a191acd3f181878bb8ceb1538fe
* | Merge "27629: DrawAllocation doesn't catch allocations done in View.layout()"Tor Norbye2012-04-022-2/+74
|\ \
| * | 27629: DrawAllocation doesn't catch allocations done in View.layout()Tor Norbye2012-04-022-2/+74
| |/ | | | | | | Change-Id: I2784712f5b298e7103c12d04bc7ae7fbeefd9cdf
* | Add lint detector for Toast.makeText() without show()Tor Norbye2012-04-024-1/+242
| | | | | | | | | | | | | | | | | | | | | | This changeset looks for Toast.makeText() calls where there is no corresponding show() afterwards on the Toast object, which is a common mistake. It also looks for attempts to pass a custom duration value, which is wrong: only Toast.LENGTH_SHORT or Toast.LENGTH_LONG are valid. Change-Id: I3a68e8934ddac76d1277f0fd292c329f30b192ee
* | Add exported content provider check to registryJon Larimer2012-04-021-1/+2
| | | | | | | | Change-Id: I3d3f0ead1397ee994ea58d57228457421ca9411a
* | Merge "Add content provider permission check"Jon Larimer2012-04-025-2/+160
|\ \ | |/ |/|
| * Add content provider permission checkJon Larimer2012-04-015-2/+160
| | | | | | | | | | | | This check looks for exported content providers with no permissions. Change-Id: I1b318b80dc8dc560c42a05db2e4dfa5bd7f45f9d
* | Merge "27584: Detect misplaced <uses-library> manifest tag at build time"Tor Norbye2012-04-025-3/+108
|\ \
| * | 27584: Detect misplaced <uses-library> manifest tag at build timeTor Norbye2012-03-235-3/+108
| | | | | | | | | | | | | | | | | | | | | (Also identifies other misplaced elements -- activities, services, uses-screens, etc etc) Change-Id: Ie9fee95c05715001be6af23c1cdd86e895e43509
* | | Merge "27441: LINT: Incorrect WrongViewCast message"Tor Norbye2012-04-025-4/+71
|\ \ \ | |_|/ |/| |
| * | 27441: LINT: Incorrect WrongViewCast messageTor Norbye2012-03-235-4/+71
| |/ | | | | | | Change-Id: I9687c0c59e13c340b2d564d5aa17635153d88d07
* | 27613: Lint false alarm on android:enabled being deprecatedTor Norbye2012-03-232-3/+6
|/ | | | Change-Id: I871f390c964cfbb8d6c4883ce426bbaa8869f446
* Add guava dependency to test projectTor Norbye2012-03-191-1/+1
| | | | Change-Id: Ic9fb4ab0838e8039e591007867df869d6130b88f
* Merge "Fix lint issues 27108, 27109 and 27110"Tor Norbye2012-03-1911-56/+132
|\
| * Fix lint issues 27108, 27109 and 27110Tor Norbye2012-03-1911-56/+132
| | | | | | | | | | | | | | | | | | | | 27108: lint confused by escaped percent signs 27109: Lint misreports resources as unused when the fully qualified class name is used 27110: Lint attribute to ignore an unused resource doesn't work for reference XML drawables Change-Id: Id8457d8305e5d2770bc8ab547a0735c63117682c
* | Dynamically link Guava and ASM in lint jarsTor Norbye2012-03-193-6/+3
|/ | | | | | | | | | The Makefiles for the lint, lint_api and lint_check libraries were *statically* linking in the Guava and ASM libraries. This made them much larger than necessary (~1.6M instead of ~100K), and for no good reason since the classes were already on the classpath, and of course this duplicates them repeatedly. Change-Id: Iec3ed623429ab8b7b8ba78f5d7a069853ae665c3
* Add getSharedPreferences to worldreadable/writable checkJon Larimer2012-03-153-9/+26
| | | | | | | Add getSharedPreferences() to the method list in the WorldReadable/WorldWritable file checks in lint. Change-Id: Ia2922e4bfe9faf70b46b239726a6c65aa9abd3dc
* Added detection for the creation of world-readable files to lintSebastian Porst2012-03-154-5/+30
| | | | Change-Id: I521d53cc23a35c11db3ccff949916c77f3f6f9bd
* Added detection of android.webkit.WebSettings.setJavaScriptEnabled to the ↵Sebastian Porst2012-03-144-1/+133
| | | | | | lint tool. Change-Id: I8be9fadfe2de26ac6f4a3bd299054a9678697f27
* Lint check tests: fix windows path separators.Raphael2012-03-121-2/+13
| | | | | | | | | | The output from the lint check typically contains a few directory/filenames. On Windows we need to change the separators to the unix-style forward slash to make the test as OS-agnostic as possible. Change-Id: I6f223fda8c294eaee2f4e522df1cc10a6145ef22
* Merge "Update unit testcode to copy test files as binaries"Tor Norbye2012-03-091-30/+9
|\
| * Update unit testcode to copy test files as binariesTor Norbye2012-03-091-30/+9
| | | | | | | | | | | | | | This should fix unit tests dealing with binary data on Windows (where CRLF conversions were getting in the way.) Change-Id: Ib8e79c8643720fadaf6080a4ccb2b466dff748a4
* | Fix issue 26663: Avoid rewriting memory mapped files on WindowsTor Norbye2012-03-091-1/+5
|/ | | | Change-Id: Ie19113652a70b55ea2db545eacd0de8c7be798c9
* Make GridLayout support work with the support libraryTor Norbye2012-03-082-1/+4
| | | | | | | Also fix the paste operation to target the parent if the paste target does not accept children. Change-Id: Id084db376e5ff9b4a374e6d2145bc890a925a078
* Fix the duplicate id detectorTor Norbye2012-03-073-247/+532
| | | | | | | | | | | | | | The duplicate id detector now handles locations properly (so you get line numbers), it handles suppressing errors via annotations, and it's better about avoiding false positives because it handles configuration variations independently. It also attempts to filter out obvious cases that aren't problems such as portrait versus landscape layouts. Related issues: http://code.google.com/p/android/issues/detail?id=22885 http://code.google.com/p/android/issues/detail?id=26454 Change-Id: Id178d08818b6cce1ebbeff6ca10e95e2906175a5
* Misc Lint FixesTor Norbye2012-03-0614-53/+222
| | | | | | | | | | | | | | | | | | | | | | | | | This changeset contains fixes for several unrelated reported lint bugs: 26505: Default disabled rules that are explicitly enabled do not activate 26467: Lint says ByteBuffer.array is API 9+ but it's really API 1+ 26501: Warning "This tag and its children can be replaced by one <TextView/> and a compound drawable" is not always correct (Partially fixed) It also fixes the following bugs: - The quickfix for the typography detector did not work for the fraction warning (replacing 1/2 with the half unicode symbol etc) - A couple of XML detectors did not check for SuppressLint on the associated root node - Add a --exitcode flag, and only set the exit code to non-zero if that flag is specified. Also fix the code such that non-fatal errors also contribute to the exit code. - Make the HTML reporter classes public to help Maven integration. Change-Id: I60f5fdcb2a465d51fa58bb918a195b373096d54b
* Change lint error codes + Windows path fixes.Raphael2012-03-063-34/+147
| | | | | | | | | | | | | - Make returns codes be positive (1..5). - Explain return codes in the usage help. - Support either env var or system properties for bindir. - Add support for a workdir property/envvar that is set by lint.bat with the original invocation directory. - Use workdir to solve relative input/output argument paths (on windows we cd to the lint.bat location and record the original path in workdir.) Change-Id: I8b2583de761ce9c4ebba250460de6c60f1ea6a84
* Merge "Remove R.attr resources from UnusedResource detector (26174)"Xavier Ducrohet2012-03-011-3/+4
|\
| * Remove R.attr resources from UnusedResource detector (26174)Tor Norbye2012-03-011-3/+4
| | | | | | | | Change-Id: I46abcb93537b3d288234729dd01005c41394d227
* | Update lint custom view rule to reflect new res-auto namespaceTor Norbye2012-03-014-7/+46
|/ | | | Change-Id: If74938a7e607ef6e1ffbc00cb0e5d191a672b0c5
* Fix outerclass handling for the @TargetApi annotationTor Norbye2012-03-019-5/+108
| | | | | | | | | | | | | | This changeset adds outerclass handling for the @TargetApi annotation, such that the API checker takes outerclasses (and outermethods, in the case of anonymous inner classes) into account when computing the effective minimum SDK For a method. This also fixes the handling of nested anonymous innerclasses for the @SuppressLint annotation. http://code.google.com/p/android/issues/detail?id=26262 Change-Id: Iafb0fd88cc41042ea1727c3882e3ddd1ebfc1f09
* Merge "Add lint check for calling native wrapper class constructors"Xavier Ducrohet2012-02-284-5/+62
|\
| * Add lint check for calling native wrapper class constructorsTor Norbye2012-02-274-5/+62
| | | | | | | | Change-Id: I59c2a64e4453c4d05bebaba1cfa4fcb31b9592e2
* | Fix configuration information for library projectsTor Norbye2012-02-288-15/+81
|/ | | | | | | | | | | | | | | | | | | | | | | | | | This changeset fixes one more bug related to lint configurations and library projects (see issue 26029). Some lint checks, such as the MergeRootFrameLayoutDetector, computes the warnings at the end of processing all files. At that point, the context points to the master project, so any errors which were actually found in a library project will instead be using the master project's configuration. That means that any suppress rules applies to the lint.xml in the library project will be ignored. This changeset fixes this by moving the logic which looks up the severity for a warning out of the lint clients and into the context. Now it checks the current projects being scanned and looks up the corresponding project for each file (based on the file prefix), and retrieves the configuration that way. This changeset also makes one more fix: It now consults *both* the library project *and* the master project to see if a rule should be ignored. This means that if you turn off a given check in your master project, you will no longer see those warnings from library projects either, which seems desirable. Change-Id: Icb5cdf7696b4908b0553f86896793515cb06f29c