DartAnalyzer output format

94 views
Skip to first unread message

Zdeslav Vojkovic

unread,
May 18, 2013, 4:56:37 AM5/18/13
to mi...@dartlang.org
Anyone knows where I can find the 'official' (or at least semi-official) description of dartanalyzer output format with --machine command line argument?
I can't find it neither in the source nor in the documentation.

This is an example of output:

WARNING|STATIC_TYPE_WARNING|UNDEFINED_GETTER|/home/zdeslav/dev/event_source/test/eventsource_test.dart|25|40|10|There is no such getter 'EVENT_BARK' in 'EventSource'

I assume that first field is severity, so probably it reads WARNING/ERROR but have no idea if there are other values.
Next 2 fields are likely the context and type of finding.
The rest of the fields seem obvious (r.g. numbers are line/col/length).

I would appreciate if anyone could provide more details. I have extended SublimeLinter with support for Dart, but need this info to finish it.

Jos Hirth

unread,
May 18, 2013, 9:39:17 AM5/18/13
to mi...@dartlang.org
https://code.google.com/p/dart/codesearch#dart/trunk/dart/pkg/analyzer_experimental/lib/src/error_formatter.dart

Line 111+

severity
error
.errorCode.type
error
.errorCode
source
.fullName
location
.lineNumber
location
.columnNumber
error
.length
error
.message

By the looks of it, error.length is the length of the squiggly line (which starts at columnNumber). So, in this case, it's as long as "EVENT_BARK".

Zdeslav Vojkovic

unread,
May 18, 2013, 9:51:50 AM5/18/13
to mi...@dartlang.org
great, thanks a lot, I couldn't find it.

I came to the same conclusion with regard to length. now let's just hope the format stays more or less stable :)


--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new
 
 

Brian Wilkerson

unread,
May 20, 2013, 1:45:27 PM5/20/13
to General Dart Discussion
Anyone knows where I can find the 'official' (or at least semi-official) description of dartanalyzer output format with --machine command line argument?

Unfortunately, there isn't one. It's on our list to document it. We'll probably document it when we re-write the command-line analyzer to use the new analysis engine.

... now let's just hope the format stays more or less stable

We don't currently have any plans to change the format, but if we find a reason to do so we'll start a discussion to get feedback first.

Brian
Reply all
Reply to author
Forward
0 new messages