FLUTTER ECOSYSTEM

eliasreis54/lcov_parser

lcov 파일을 파싱하기 위한 간단한 dart 구현.

lcov_parser 프로젝트 이미지
Stars
9
Forks
3
최근 푸시(UTC)
2026. 3. 12.
프로젝트 상태
활성
Elias Reis GitHub avatar
GITHUB User

Elias Reis ↗

Software engineer

@VGVenturesCampinas - São Paulo
언어Dart

기술 주제

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 5 개

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

Lcov parser

Dart

A simple lcov file parser implementation in Dart.

The lcov is used to get test coverage. It works as a front-end for gcov collecting the data and generating the coverage info.

This implementation translates the lcov format to Dart classes we can understand and use the coverage info for a lot of proposals.

How to use

To use it is very simple, this package exports the model of the record and the parser class, and you will receive from the return of the parser is a list of record. As you can see in the code below

import 'package:lcov_parser/lcov_parser.dart';

void main() async {
    final file = 'absolute path from lcov.info file';
    final records = await Parser.parse(file);
}

Another option is to parse records from a list of strings:

void main() {
  final lines = [
    'SF:lib/src/interceptors/app_version_interceptor.dart',
    'DA:6,1',
    'DA:11,1',
    // ...more lines here
    'end_of_record',
  ];
  final records = Parser.parseLines(lines);
}

You also will find a script example in the example/main.dart file.

How to contribute with the project.

Feel free to open issues in this repository or open your pull request.

Running the tests

In the root path

dart test