When you invoke Analyze > Inspect Code... in the IDE, you're not just running Android Lint, you're running IntelliJ's full set of inspections. (In the Android plugin we hook lint up to their inspection machinery such that they mostly act as if they're themselves IDE inspections.)
There are around 300 Android lint checks -- but there is an even larger number of IDE inspections.
Generally, in lint we try to keep the checks mostly Android specific -- there's no need to go there and warn about things (such as dead code) when the IDE will also warn about it -- you'd get a double set of highlights.
Therefore, when you run lint from the command line, you're only getting the lint checks, not the IDE inspections.
This, by the way, is why Android Lint checks are organized into a separate set of categories in the inspections UI:
We *could* place the various lint checks into their individual categories instead (security, performance, accessibility, etc) and blend them in with the other IDE inspections, but it seemed important to understand what's lint, and what's not.
It is possible to run the IntelliJ inspections from the command line too -- look at the inspect.sh script that ships with the IDE in the bin/ folder. However, if you use it you'll need to check in the IDE project files (.idea, *.iml etc) since that script won't load Gradle projects and attempt to do a Gradle sync to infer the model from the build.gradle files -- and the output isn't very user friendly - you get a folder full of .xml files, one per inspection. But it's pretty easy to transform it with XSLT, and if you use JetBrains' TeamCity server product I believe they have good ways of visualizing these things. (You can also expose these files as build artifacts; users can download these files and load them into the inspections UI as Offline results.)
Finally that leaves the discrepancy between Lint running inside the IDE and in Gradle. There *are* some differences, but there are fewer and fewer of them. Until 2.3 a lot of checks had separate implementations in the IDE and in lint, but that's no longer the case.
The difference is really that the bytecode based checks (ClassScanner implementations) don't run in the IDE. That's because we often don't have up to date .class files when the inspections run (and it wasn't trivial to hook up building to the inspections process.) But bytecode based checks have many, many disadvantages over AST based checks - so I've been porting nearly all of the previous class scanners to AST scanners. There's only a couple of them left, and I wouldn't worry about them -- the important checks are all running in both places.
(There are a couple of other discrepancies too; when lint runs in the IDE it gets access to services from the IDE, such as the ability to read its proxy settings; useful if you enable the off-by-default gradle check which checks whether all the artifacts are the latest available versions by connecting to maven central's search, and the ability to look up recent SDK repository versions cached by the SDK manager in the IDE etc.)
-- Tor