Apply linter

This commit is contained in:
lowlighter
2021-06-17 23:03:53 +02:00
parent c13582ec52
commit 8e394bf76d
2 changed files with 3 additions and 3 deletions

View File

@@ -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) */
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] ?? ""
if ((prefixed)&&(prefix)) {
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}`)
await closed
console.debug(`metrics/command/spawn > ${command} with ${args.join(" ")} > reader closed`)
return code === 0 ? solve(stdout) : reject(stderr)
return code === 0 ? solve() : reject()
})
})
}

View File

@@ -152,7 +152,7 @@ async function analyze({login, imports, data}, {results, path}) {
for (let page = 0; ; page++) {
try {
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}, {
stdout(line) {
//Unflag empty output