Lint: Prefix unused variables/parameters

This commit is contained in:
daz 2025-04-09 16:40:33 -06:00
parent 016b3d4592
commit 078dac7a70
No known key found for this signature in database
4 changed files with 7 additions and 7 deletions

View File

@ -44,7 +44,7 @@ export class CacheCleaner {
.filter(Boolean) as string[]
return await provisioner.provisionGradleWithVersionAtLeast(preferredVersion, wrapperScripts)
} catch (e) {
} catch (_) {
// Ignore the case where the preferred version cannot be located in https://services.gradle.org/versions/all.
// This can happen for snapshot Gradle versions.
core.info(

View File

@ -106,7 +106,7 @@ class ShortLivedTokenClient {
// This should be only 404
attempts++
if (attempts === this.maxRetries) {
return new Promise((resolve, reject) =>
return new Promise((_resolve, reject) =>
reject(
new Error(
`Develocity short lived token request failed ${serverUrl} with status code ${response.message.statusCode}`
@ -117,12 +117,12 @@ class ShortLivedTokenClient {
} catch (error) {
attempts++
if (attempts === this.maxRetries) {
return new Promise((resolve, reject) => reject(error))
return new Promise((_resolve, reject) => reject(error))
}
}
await new Promise(resolve => setTimeout(resolve, this.retryInterval))
}
return new Promise((resolve, reject) => reject(new Error('Illegal state')))
return new Promise((_resolve, reject) => reject(new Error('Illegal state')))
}
}

View File

@ -80,7 +80,7 @@ async function addDistributionSnapshotChecksumUrls(checksumUrls: [string, string
// // Find all links ending with '-wrapper.jar.sha256'
const wrapperChecksumLinks = $('a[href$="-wrapper.jar.sha256"]')
wrapperChecksumLinks.each((index, element) => {
wrapperChecksumLinks.each((_index, element) => {
const url = $(element).attr('href')!
// Extract the version from the url

View File

@ -80,14 +80,14 @@ test('will cleanup unused gradle versions', async () => {
})
async function runGradleBuild(projectRoot: string, args: string, version: string = '3.1'): Promise<void> {
const status31 = await exec.exec(`gradle -g HOME --no-daemon --build-cache -Dcommons_math3_version="${version}" ${args}`, [], {
await exec.exec(`gradle -g HOME --no-daemon --build-cache -Dcommons_math3_version="${version}" ${args}`, [], {
cwd: projectRoot
})
console.log(`Gradle User Home initialized with commons_math3_version=${version} ${args}`)
}
async function runGradleWrapperBuild(projectRoot: string, args: string, version: string = '3.1'): Promise<void> {
const status31 = await exec.exec(`./gradlew -g HOME --no-daemon --build-cache -Dcommons_math3_version="${version}" ${args}`, [], {
await exec.exec(`./gradlew -g HOME --no-daemon --build-cache -Dcommons_math3_version="${version}" ${args}`, [], {
cwd: projectRoot
})
console.log(`Gradle User Home initialized with commons_math3_version="${version}" ${args}`)