Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Ability to add exclusions to grcov #90

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Naming convention fix: Rust -> TS
  • Loading branch information
Eugene Retunsky committed Aug 18, 2020
commit 550fd67f9b64b4bdd5f2f8f46e262340e6de4959
24 changes: 12 additions & 12 deletions src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ export interface User {
pathMapping?: string[],
prefixDir?: string,
outputPath?: string,
excl_br_line?: string,
excl_br_start?: string,
excl_br_stop?: string,
excl_line?: string,
excl_start?: string,
excl_stop?: string,
exclBrLine?: string,
exclBrStart?: string,
exclBrStop?: string,
exclLine?: string,
exclStart?: string,
exclStop?: string,
}

/**
Expand Down Expand Up @@ -132,22 +132,22 @@ async function loadUser(path: string): Promise<User> {
user.prefixDir = contents['prefix-dir'];
}
if (contents['excl-br-line']) {
user.excl_br_line = contents['excl-br-line'];
user.exclBrLine = contents['excl-br-line'];
}
if (contents['excl-br-start']) {
user.excl_br_start = contents['excl-br-start'];
user.exclBrStart = contents['excl-br-start'];
}
if (contents['excl-br-stop']) {
user.excl_br_stop = contents['excl-br-stop'];
user.exclBrStop = contents['excl-br-stop'];
}
if (contents['excl-line']) {
user.excl_line = contents['excl-line'];
user.exclLine = contents['excl-line'];
}
if (contents['excl-start']) {
user.excl_start = contents['excl-start'];
user.exclStart = contents['excl-start'];
}
if (contents['excl-stop']) {
user.excl_stop = contents['excl-stop'];
user.exclStop = contents['excl-stop'];
}
if (contents['output-path']) {
user.outputPath = contents['output-path'];
Expand Down
24 changes: 12 additions & 12 deletions src/grcov.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,34 +111,34 @@ export class Grcov {
args.push(config.user.prefixDir);
}

if (config.user.excl_br_line) {
if (config.user.exclBrLine) {
args.push('--excl-br-line');
args.push(config.user.excl_br_line);
args.push(config.user.exclBrLine);
}

if (config.user.excl_br_start) {
if (config.user.exclBrStart) {
args.push('--excl-br-start');
args.push(config.user.excl_br_start);
args.push(config.user.exclBrStart);
}

if (config.user.excl_br_stop) {
if (config.user.exclBrStop) {
args.push('--excl-br-stop');
args.push(config.user.excl_br_stop);
args.push(config.user.exclBrStop);
}

if (config.user.excl_line) {
if (config.user.exclLine) {
args.push('--excl-line');
args.push(config.user.excl_line);
args.push(config.user.exclLine);
}

if (config.user.excl_start) {
if (config.user.exclStart) {
args.push('--excl-start');
args.push(config.user.excl_start);
args.push(config.user.exclStart);
}

if (config.user.excl_stop) {
if (config.user.exclStop) {
args.push('--excl-stop');
args.push(config.user.excl_stop);
args.push(config.user.exclStop);
}

// TODO:
Expand Down