| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
See issue 35959 for background.
Change-Id: I8042b42e4649163cf8e6974d074ac05777685766
|
|
|
|
| |
Change-Id: I220112559c1a7f30c505551b41004560b6e89891
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I47d3757cac4b9204bdb15a84a8679921adc049a3
|
|/
|
|
|
|
|
| |
Make incremental lint in source files use the Eclipse context
to find super classes.
Change-Id: I31af7a146c259875857026bc7721294205482a91
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I3b79bef6981d880fe6a545429754e03bd384645c
|
|
|
|
| |
Change-Id: I1b39ee439a532f3f6758be35b569948e2e906665
|
|
|
|
| |
Change-Id: If2b905197d5d81c6f98315a0d48ff37091e8282b
|
|
|
|
|
|
| |
Replace "this.mFoo = foo" with just "mFoo = foo".
Change-Id: I44d537ebb62cd7e5c8493a0b50dcb527cd20f91c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset moves most constants into the SdkConstants
class, and gets rid of AndroidConstants and LintConstants.
It also migrates all non-ADT specific constants from
AdtConstants into SdkConstants. It furthermore moves various
other constants (such as those in XmlUtils and ValuesDescriptors)
into the constants class. It also fixes the modifier order
to be the canonical modifier order (JLS 8.x).
Finally, it removes redundancy and combines various constant
aliases such that we don't have both NAME_ATTR and ATTR_NAME
pointing to "name", etc.
Change-Id: Ifd1755016f62ce2dd80e5c76130d6de4b0e32161
|
|
|
|
| |
Change-Id: Ie36bcb31be87a7cd16ab1b958c0264ca8b51e385
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I8434515179b8fd2ee3872506fc237c467a98db44
|
|/
|
|
| |
Change-Id: I67b37a0511dfba210dbcef393ee7610cef8b56a2
|
|
|
|
| |
Change-Id: If341cde0f0600c5975c6e847e228d72f5deefb23
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a project contains errors in the source code, lint won't be able to
parse the source code, and in that case it might draw the wrong
conclusions about unused resources.
This can also happen if there's an actual bug in the Java parser,
which is sometimes the case; see for example
http://code.google.com/p/projectlombok/issues/detail?id=415
http://code.google.com/p/projectlombok/issues/detail?id=311
In both cases, when we encounter a failure to parse a Java file, we
record the fact that not all Java files were properly processed, and
rules, such as the UnusedResource detector, can (and now does) use
this to for example skip reporting unused resources in this case since
it is operating with incomplete data.
Change-Id: I00991c10d05965ce151fb0dd322f32229dcd12cd
|
|
|
|
| |
Change-Id: I6c281183a176210a6991e81497d9fb242c3851bd
|
|
|
|
| |
Change-Id: I88cfbb3c497cc65e3d16c3ba1fe9ceeaf2613103
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When using switch statements on enums, the compiler will generate
extra code to make the switch invocation efficient. For example, it
generates a method which looks up all the values in the enum, calls
ordinal() on each, and then creates an array which has all the enum
values indexed by ordinal.
The problem is that this helper code will end up referencing fields
which may have a higher API requirement than is currently being used,
and Lint would flag these as illegal API references. That's not
correct in this case; as long as the corresponding jump table does not
actually use these references, there's no problem.
This changeset makes lint aware of this pattern, and when it
encounters an invalid field reference inside one of these synthetic
switch constant lookup methods, it will search for the corresponding
table lookup, check whether the actual key is used, and only in that
case complain.
It also makes error messages associated with enums in general a bit
better, when the whole enum class itself requires a higher API. (This
would generate a message related to invocation of ordinal() which
might not be obvious to everybody.) Finally, it cleans up class name
formatting such that we never reference inner classes using "$" in
error messages.
Change-Id: I28a14084c160866e69f63f62b5bc8f21ee50215c
|
|/
|
|
| |
Change-Id: Iffd270a227a8a76636cbfa5d19c6e0330a8391fb
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I95bf3bc87e4378af6ef866df0a1ffb69f8fd7a41
|
|/
|
|
|
|
|
|
|
|
|
| |
This changeset expands on the lint check for calling String
convenience methods that are locale sensitive without an explicit
locale (issue 36822). It checks whether a SimpleDateFormat constructor
that uses the default locale is called, and if so suggests either
specifying a locale or using one of the pre-configured locale
sensitive instances of SimpleDateFormat.
Change-Id: Ic4fcb72c2ee6b31d1534b4d909493fef7dcff867
|
|
|
|
|
|
|
| |
This helps catch errors like
http://code.google.com/p/android/issues/detail?id=36821
Change-Id: I1ceda3183d8b1e29510ba0be2523dc6eb9c7a23b
|
|
|
|
| |
Change-Id: I320af69286e7f0bcee395419acfeea7ed8f8d384
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I46630c51a4f055222fb614d73419cb28272b87de
|
|/
|
|
| |
Change-Id: Ia51e3e2280c3d360496550df50a540571b9b7582
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This changeset adds a lint rule which looks for potential
leaks when using View#setTag(int, Object) where the Object
is likely to contain a strong reference to the context,
such as views and view holders.
http://code.google.com/p/android/issues/detail?id=26984
Change-Id: Ib606485d2b875d2129c339b9b89be0e444629408
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset fixes the value completion such that you can add custom
values into properties that also have enum fields.
Rather than have separate completion routines for properties based on
whether they contain an enum, a flag, a reference, etc., have a single
completer which considers all the various formats and combines the
results.
In addition to combining results, this now also offers completion on
dimensions, and offers theme attribute values for references as well.
Change-Id: Idbc1799a34b3a3f14ea567654953925bf12afb8f
|
|
|
|
|
|
|
|
| |
Fix the commit prefs lint check such that it correctly identifies
scenarios where the innerclass "Editor" is referenced without its
qualifying top level class, SharedPreferences.
Change-Id: I3a22738508b66ce0b3e836feff91f816b2c368e8
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The explanation text for issues can now contain some simple
markup such as * around sentences for bold and ` for monospace.
In the HTML report this is converted to HTML markup using <b>
and <code> spans, as well as <a> for http:// links.
Change-Id: I875a55a0ab9a61c2e8bb493ad94d5e4d51dd1072
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This changeset changes the default targetSdkVersion written into new
projects from being hardcoded to "15" to being the same level as the
build target's API level.
It also adds a new lint check which looks at the targetSdkVersion and
complains if it's not the same as the highest known version (currently
16). The issue explanation points to the javadocs for the
android.os.Build.VERSION_CODES class for details on how to upgrade the
app.
Change-Id: I00c2bd7cd8fa239b9fd1de9b2d35ff9faf87d25f
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When categories and ids are clicked the page will return to the top.
Added formatting to CSS to maintain consistency.
There is currently no way of returning to top.
Change-Id: I539138c90a6ef3e7f4b7095190a307f8266fb0bf
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
Developer documentation says naming convention for 3.0 and up is still
ic_menu for action bar icons so if name.startsWith ic_menu need to use
the correct px count
Change-Id: I9db3199f805934a0bad3eac3b1306ef881b0e631
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The Lint CLI does not distinguish between errors and fatal errors in
the error output. However, changing the severity was happening when
the issue was reported rather in the output reporter itself, which
meant that it accidentally changed the severity in the XML report,
where all metadata should be preserved.
Change-Id: Ib3ee9a20a7b1d2413ed85e1952f5f3d1783a8826
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of referring to "java.io.IOException#<init>" in the
error messages, refer to this method as
"new java.io.IOException", since the fact that constructors
get mapped to the internal name "<init>" isn't something
everybody knows.
Change-Id: I4e9aacd9cfd3acae340737d4e3094c6dbdcf52f5
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The API checker needs to look up the corresponding source code source
range for a given bytecode method dispatch, and the line number
information found in the .class file is not accurate enough. Lint has
some heuristics to search for the corresponding source range, but this
did not work properly for cases where the method call was a parent
constructor, via the "super()" call.
It also fixes a bug in handling the default package.
Change-Id: I15bb07b6709ab9a53376398fe92715f6e6eba968
|
| |
| |
| |
| |
| |
| |
| | |
Move stuff out of sdklib into common and ide_common.
Remove androidprefs and move the one class into common.
Change-Id: I71d126a13cf2ba413692e29616f4968a37d7b33a
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Apparently java.lang.Math is faster than FloatMath now with the newer
JITs. This reverses the old lint rule which would recommend using
FloatMath instead of Math with the opposite recommendation, provided
minSdkVersion is Froyo or greater. See issue 36199 for more.
Change-Id: I362cb7da011d39f5620db96e113f8255a828d40b
|
| |
| |
| |
| |
| |
| |
| | |
This CL adds some code to more gracefully handle
problems with the Api Checker's binary cache.
Change-Id: I02c86ab16b857b88df8945c84cb92c7217a6144a
|
| |
| |
| |
| | |
Change-Id: Id96616abe9be2a994b642808164b092c04ae8a0c
|