-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Add VSCodium Reporter #173
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,30 @@ | ||||||||||||||||||||||||||
"use strict"; | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
var autils = require("../../AUtils"); | ||||||||||||||||||||||||||
var GenericDiffReporterBase = require("../GenericDiffReporterBase"); | ||||||||||||||||||||||||||
var ostools = require("../../osTools"); | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
class Reporter extends GenericDiffReporterBase { | ||||||||||||||||||||||||||
constructor() { | ||||||||||||||||||||||||||
super("codium"); | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
if (ostools.platform.isWindows) { | ||||||||||||||||||||||||||
this.exePath = autils.searchForExecutable("codium.cmd"); | ||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||
this.exePath = autils.searchForExecutable("codium"); | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (code_refinement): Consider verifying the existence of the executable path after assignment. This adds an extra layer of reliability by ensuring the path indeed points to an existing executable before proceeding.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This smells like a bad suggestion? I only see multireporter throwing |
||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
report(approved, received, options) { | ||||||||||||||||||||||||||
autils.createEmptyFileIfNotExists(approved); | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
options.cmdArgs = ["-n", "--diff", received, approved]; | ||||||||||||||||||||||||||
options.cmdOptionOverrides = { | ||||||||||||||||||||||||||
detached: true, | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question (code_clarification): Clarify the need for the 'detached' option in 'cmdOptionOverrides'. Understanding the specific reason for running the process detached could be beneficial for future maintenance. |
||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
return super.report(approved, received, options); | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
module.exports = Reporter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (typo): The constructor argument should match the reporter name 'vscodium', not 'codium'.
This ensures consistency and avoids confusion when referencing the reporter by name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can change this to codiumReporter.js, would prefer a human to advise though, not familiar with this codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: done