| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
settings"
|
| |
| |
| |
| | |
Change-Id: I9401318afe771d11ef6f211ee3f9cb6c62df8f83
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The string format lint check might be processing strings not intended
for String.format (but intended for example for
android.text.format.Time#format), in which case it will be wrong about
whether two conversions are incompatible. (This does not fix all
scenarios; if a date string looks like a String.format in the sense
that all of its formatting characters are defined by String.format
then the string will assume to be intended for String.format.)
This changeset attempts to recognize this, and also make the "is
incompatible" check a bit more nuanced: it will now consider "d"
compatible with "x" for example.
Change-Id: I63ce082f40169e4033809d25cae3cf116c9e2044
|
|\ \ |
|
| |/
| |
| |
| | |
Change-Id: I997ad6f1348e9884b56a60ef453cd02754c936bb
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset enables the button order check by default, and makes
the rule consider the minimum and target SDK more carefully.
* If both the min and target SDK >= 14, the rule enforces the new
button order.
* If both the min and target SDK <= 14, then the rule does nothing.
* Otherwise, if warns if the wrong button order is in a layout that is
in a layout*-v14 or higher folder, or if it's in a non-v14 folder
and there is no corresponding v14 layout.
Change-Id: Idf54f86d7a004fdb073486160e4d5ff5fd1cd45c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset adds support for suppressing in XML files:
(1) Lint will ignore errors found in attributes and elements if the
element (or any surrounding parent elements) specifies a
tools:ignore="id-list" attribute where the id-list matches the id
of the reported issue (or "all"). The "tools" prefix can be any
prefix bound to the namespace "http://schemas.android.com/tools"
(2) There's a new quickfix shown for XML lint warnings which offers to
add a lint suppress attribute for a given lint warning (setting
the id to the id of the warning, and adding the tools namespace
binding if necessary).
(3) The XML formatter now handles namespaces a bit better: after the
preferred attributes (id, name, style, layout params, etc) have
been handled, attributes are sorted by namespace prefix before
they are sorted by local name -- which effectively will sort any
new tools:ignore attributes to the end.
Change-Id: Id7474cde5665d9bd29bdd4e0d0cc89ed4d422aea
|
|
|
|
|
|
|
| |
This addresses
25176: LINT: Incorrectly flags Action Bar icons as wrong size
Change-Id: I1309c60f48585dd118951d928e3cd3d06a1d2939
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- If specifying a report directory (rather than an HTML file name),
always write out an overview report. (Before this it only wrote an
overview report if issues were *found* in multiple projects).
- If checking *specific* issues (with the --check flag), don't write out
the list of suppressed issues.
- If no errors were found, write a message to that effect.
- Make some space between the explanation area and the More Info URL,
if any
- Code cleanup
Change-Id: I0c1a5cf14de15276904e8999323df443fc39dc9c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset adds 3 new lint checks related to buttons:
(1) Order. This looks for "wrong" button orders, where either the
Cancel button is not on the left, or the OK button is not on the
right. (These are checked separately since it's possible to have
for example "Cancel | Send".)
(2) Case. This looks at OK and Cancel button labels and ensure
that they're using the "standard" capitalization - this
catches dialogs which use "CANCEL | ABORT" or "Cancel | Ok".
(Yes, lint found several existing cases of this!)
(3) Back. This looks for button with the label "Back" and warns to use
the Android-specific naviagation approach instead.
Change-Id: Ic0e4fe3a0347647fdba7c25d8e2290ec0e6bdd39
http://developer.android.com/design/building-blocks/dialogs.html
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's better to use "ifRoom" instead. The check allows a menu to have a
couple of "always" items if there is also at least one "ifRoom" item
in the menu. In Java code, the lint check will complain if it finds
one or more references to MenuItem.SHOW_AS_ACTION_ALWAYS but no
references to SHOW_AS_ACTION_IF_ROOM.
Change-Id: Ib13f89920bd3919ffd7fc0f0137e90103e8850c3
|
|\ \
| |/
| |
| | |
LinearLayouts"
|
| |
| |
| |
| | |
Change-Id: I648e0adde917e47da02f181c019bf0302ebab643
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Change-Id: Ic08e20bf6d729362fae7d82c84e664e05b6ba843
|
|/
|
|
|
|
|
|
|
|
| |
This just adds a simple printf of the resFolder + type
when the CommonXmlEditor can't find a matching delegate.
Also a 1-character typo fix in a lint message
and ignore bin/gen folders for the sdk controller app.
Change-Id: If43877e6c4d4158c475507671993fe29716a7c5e
|
|
|
|
| |
Change-Id: I2b0b118c2f4c3e64fb4c2e68ae594bb5e18a5938
|
|
|
|
| |
Change-Id: Ib7b8914f05849db49dd9f25349be08e67eb7264d
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, include the suppress help as a section in the bottom of the
HTML report, and link to it from each issue explanation.
Second, tweak the generated HTML and CSS a bit: Fix <a> element
generation to be properly closed (which avoids issue where the first
link in each location list did not have the right style), make links
in the More Info have a blue color to stand out more, and add a Holo
like gradient in the background color for browsers that support it.
Change-Id: I3078cb1f1a5112dc6360816c4a6a6c37771ab6fc
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new flag, --showall, to turn off the abbreviation handling which
truncates long lists (such as all missing translation keys, or
additional resource locations).
In HTML reports, always include full location lists, but by default
hide them via a JavaScript reveal button. Also style buttons a bit
more holo-like.
Change-Id: I6e4ac7f910d1161981c48c7c4c766f03e650fdf6
|
|
|
|
| |
Change-Id: Ia9dd344a8b12a8bce479aa19fed6c876c86b7b0c
|
|
|
|
| |
Change-Id: Ie00cb9e23098676db021d6cc4d2f3d99a5362dbc
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset adds a quickfix for adding @TargetApi(N) for lint
warnings where API <N> required by the given access is too high for
the current min SDK.
It also tweaks the add annotation label format to be similar to the
regular javac one.
Change-Id: Ia38f94c58cb59ae0cdd2416c1d019c9e7174797b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset contains no semantic changes, just a couple of simple
refactorings:
(1) Rename the "Lint" class to "LintDriver". "Lint" is a bit generic
(there's already LintClient for example), and this object was
already referred to as a driver from various other API's, such as
Context.getDriver().
(2) Rename LintRunner in Eclipse to EclipseLintRunner, similar to the
other EclipseLintClient in the same package - and to avoid
confusion with LintDriver.
(3) Move all the lint fix inner classes inside the LintFix class out
as top level classes. The class was getting really large and
there's really no good reason to keep all the individual fixes as
inner classes; there's already a separate lint package for them.
Change-Id: Ifc0004bfb38f8e11e33e9ddc477b6cf07ca319f2
|
|
|
|
| |
Change-Id: I14e997d4fb7a38a15b764d195c001506c6b73c6c
|
|
|
|
| |
Change-Id: I7b5b2c8031a21ad255c835607a1394541e89e73a
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset adds a new marker resolution for adding @SuppressLint
annotation (or modifying an existing @SuppressLint) in the method,
field or class surrounding a lint warning. It searches up in scope
and adds one suggestion for each enclosing applicable scope.
This changeset also makes the suppress id's be case insensitive such
that a codestyle similar to the one used by @SuppressWarnings is
possible.
Change-Id: I0a6a80c4e2d526f1c8fc6aedd95674a25e6a22f0
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Ica2631561584fc520e0776843c784d68c1f35093
|
| |
| |
| |
| | |
Change-Id: Ic49dc60284820ed01841a8fdbf09c4668e285169
|
| |
| |
| |
| | |
Change-Id: Id4caccd3f38f41288cc84dfe94546f18316631a2
|
| |
| |
| |
| | |
Change-Id: I706443006cd6164718428cd1c6909303acda81dc
|
|/
|
|
| |
Change-Id: I1e03d928e6abe306a6a861cbf80b896cb5cd864e
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset makes various improvements to the Lint error report:
the styles are now in a separate stylesheet, and the default style is
Holo-like. Paths are handled better when linting multiple projects
such that the report title includes the root-relative project path,
and all filenames are then relative to the project root. The table of
contents is now a table, and includes error and warning icons.
Change-Id: I4e49f7b226bfa4d7b46e3a29e006fe78a504e9ef
|
|
|
|
|
|
|
| |
The @ApiTarget annotation lets you annotate classes, constructors
and methods with a temporary local version of a min sdk.
Change-Id: Ic9d166d45fde45f1c97e503cebf07d5ae0635c73
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
This changeset adds support for suppressing lint warnings by
annotatating variable declarations, fields, methods and classes.
Change-Id: If274d65bccdc5c7d6426566c635245d6b3aae147
|
| |
| |
| |
| | |
Change-Id: I2bf31a95fbb9835912df06eb9319820668019aeb
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This changeset adds support for suppressing lint warnings by
annotatating classes and methods. (Finer granularity will be available
for Java source detectors, but does not work for byte code detectors
since those annotations disappear from the .class file).
It also rewrites two of the existing bytecode detectors to use the ASM
DOM instead of the old visitor pattern such that it can pass a
MethodNode to the Lint driver to check for suppress annotations.
While doing that I also make the field getter detector print the name
of the field that the getter call can be replaced with.
Change-Id: I8f7accb0219e6e9b3c499f16e7c0eb46853bbe04
|
|/
|
|
| |
Change-Id: Ic02970df139fdb87ab56e46e95155c18e9aa6ccc
|
|
|
|
|
|
|
|
|
|
|
| |
If lint writes out multiple HTML reports (e.g. when specifying a directory to the --html flag), and
there are more projects than just one, write an overview doc which contains a table of all the
projects and the corresponding error and warning counts in decreasing order, with links to
the individual reports.
Also ensure that there are no case-insensitive filename clashes.
Change-Id: I4dcda14a625863e71022734088a027fc8ac357d0
|
|
|
|
| |
Change-Id: Ic884ec376d99d9b10a123f9b8a084987dd398e0e
|
|
|
|
|
|
|
|
| |
This changeset makes lint recognize when it's invoked in an Android
build environment, and if so locate the generated sources and bytecode
output locations automatically.
Change-Id: If217a49b7c7168cb762a36494d1aedbbb0fdbb6a
|
|
|
|
| |
Change-Id: I8d70800ae7902851139c620c64b2abe27ba01450
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you point the --html flag to a directory rather than a file (or to
a nonexistent file which does not have a file extension, such as
/tmp/lintoutput/) then lint will create a separate report for each
linted project and write each one into the export directory.
It also writes the project name into the report title.
(This changeset also performs some other cleanup to make delegating
HTML reporting easier now that it's done by the multi-project
exporter.)
Change-Id: I460e9fad5ae7176d066550f6193ba79a7668e416
|
|
|
|
| |
Change-Id: Ia76b2fb5693d7e36fed2258791eda9c59a48ff49
|
|
|
|
|
|
|
| |
This changeset makes the lint driver able to process .jar files and
run the detectors on the classes inside.
Change-Id: Iaf7303197b953d6c6f925cdf83ad33a8ecd581a5
|