Add source line to snippet metadata file (#26274)

* Add source line to snippet metadata

* Parse sourceLine as an int
This commit is contained in:
Danny Tuppeny 2019-01-09 15:09:42 +00:00 committed by GitHub
parent 6d6f5f6512
commit 14fb64353c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,6 +146,9 @@ void main(List<String> argList) {
output: args[_kOutputOption] != null ? File(args[_kOutputOption]) : null,
metadata: <String, Object>{
'sourcePath': environment['SOURCE_PATH'],
'sourceLine': environment['SOURCE_LINE'] != null
? int.tryParse(environment['SOURCE_LINE'])
: null,
'package': packageName,
'library': libraryName,
'element': elementName,