Apply linter
This commit is contained in:
@@ -163,7 +163,7 @@ export async function run(command, options, {prefixed = true, log = true} = {})
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**Spawn command (use this to execute commands and process output on the fly) */
|
/**Spawn command (use this to execute commands and process output on the fly) */
|
||||||
export async function spawn(command, args = [], options = {}, {prefixed = true, timeout = 300*1000, stdout} = {}) {
|
export async function spawn(command, args = [], options = {}, {prefixed = true, timeout = 300*1000, stdout} = {}) { //eslint-disable-line max-params
|
||||||
const prefix = {win32:"wsl"}[process.platform] ?? ""
|
const prefix = {win32:"wsl"}[process.platform] ?? ""
|
||||||
if ((prefixed)&&(prefix)) {
|
if ((prefixed)&&(prefix)) {
|
||||||
args.unshift(command)
|
args.unshift(command)
|
||||||
@@ -181,7 +181,7 @@ export async function spawn(command, args = [], options = {}, {prefixed = true,
|
|||||||
console.debug(`metrics/command/spawn > ${command} with ${args.join(" ")} > exited with code ${code}`)
|
console.debug(`metrics/command/spawn > ${command} with ${args.join(" ")} > exited with code ${code}`)
|
||||||
await closed
|
await closed
|
||||||
console.debug(`metrics/command/spawn > ${command} with ${args.join(" ")} > reader closed`)
|
console.debug(`metrics/command/spawn > ${command} with ${args.join(" ")} > reader closed`)
|
||||||
return code === 0 ? solve(stdout) : reject(stderr)
|
return code === 0 ? solve() : reject()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ async function analyze({login, imports, data}, {results, path}) {
|
|||||||
for (let page = 0; ; page++) {
|
for (let page = 0; ; page++) {
|
||||||
try {
|
try {
|
||||||
console.debug(`metrics/compute/${login}/plugins > languages > indepth > processing commits ${page*per_page} from ${(page+1)*per_page}`)
|
console.debug(`metrics/compute/${login}/plugins > languages > indepth > processing commits ${page*per_page} from ${(page+1)*per_page}`)
|
||||||
let file = null, lang = null, empty = true
|
let empty = true, file = null, lang = null
|
||||||
await imports.spawn("git", ["log", ...data.shared["commits.authoring"].map(authoring => `--author="${authoring}"`), "--regexp-ignore-case", "--format=short", "--patch", `--max-count=${per_page}`, `--skip=${page*per_page}`], {cwd:path}, {
|
await imports.spawn("git", ["log", ...data.shared["commits.authoring"].map(authoring => `--author="${authoring}"`), "--regexp-ignore-case", "--format=short", "--patch", `--max-count=${per_page}`, `--skip=${page*per_page}`], {cwd:path}, {
|
||||||
stdout(line) {
|
stdout(line) {
|
||||||
//Unflag empty output
|
//Unflag empty output
|
||||||
|
|||||||
Reference in New Issue
Block a user