Skip to content

Add command input to coverage action ("publish" the default, or "complete")#96

Merged
brynary merged 5 commits into
mainfrom
bh-complete-command
May 7, 2025
Merged

Add command input to coverage action ("publish" the default, or "complete")#96
brynary merged 5 commits into
mainfrom
bh-complete-command

Conversation

@brynary

@brynary brynary commented May 7, 2025

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 7, 2025 16:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

@qltysh

qltysh Bot commented May 7, 2025

Copy link
Copy Markdown
Contributor

Diff Coverage: The code coverage on the diff in this pull request is 100.0%.

Total Coverage: This PR will increase coverage by 0.2%.

File Coverage Changes
Path File Coverage Δ Indirect
coverage/src/action.ts 0.2
coverage/src/settings.ts 0.4
🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@qltysh

qltysh Bot commented May 7, 2025

Copy link
Copy Markdown
Contributor

1 new issue

Tool Category Rule Count
qlty Duplication Found 34 lines of similar code in 2 locations (mass = 140) 1

Comment thread coverage/src/action.ts
Comment on lines +175 to +207
try {
const env: Record<string, string> = {
...process.env,
QLTY_CI_UPLOADER_TOOL: "qltysh/qlty-action",
QLTY_CI_UPLOADER_VERSION: Version.readVersion() || "",
};

if (token) {
env["QLTY_COVERAGE_TOKEN"] = token;
}

this._emitter.emit(EXEC_EVENT, {
command: [qltyBinary, ...completeArgs],
env,
});
this._output.info(`Running: ${[qltyBinary, ...completeArgs].join(" ")}`);

await this._executor.exec(qltyBinary, completeArgs, {
env,
listeners: {
stdout: (data: Buffer) => {
qlytOutput += data.toString();
},
stderr: (data: Buffer) => {
qlytOutput += data.toString();
},
},
});
} catch {
this.warnOrThrow([
"Error completing coverage. Output from the Qlty CLI follows:",
qlytOutput,
]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found 34 lines of similar code in 2 locations (mass = 140) [qlty:similar-code]

@brynary brynary merged commit 34b2098 into main May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants