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[] .filter(Boolean) as string[]
return await provisioner.provisionGradleWithVersionAtLeast(preferredVersion, wrapperScripts) 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. // Ignore the case where the preferred version cannot be located in https://services.gradle.org/versions/all.
// This can happen for snapshot Gradle versions. // This can happen for snapshot Gradle versions.
core.info( core.info(

View File

@ -106,7 +106,7 @@ class ShortLivedTokenClient {
// This should be only 404 // This should be only 404
attempts++ attempts++
if (attempts === this.maxRetries) { if (attempts === this.maxRetries) {
return new Promise((resolve, reject) => return new Promise((_resolve, reject) =>
reject( reject(
new Error( new Error(
`Develocity short lived token request failed ${serverUrl} with status code ${response.message.statusCode}` `Develocity short lived token request failed ${serverUrl} with status code ${response.message.statusCode}`
@ -117,12 +117,12 @@ class ShortLivedTokenClient {
} catch (error) { } catch (error) {
attempts++ attempts++
if (attempts === this.maxRetries) { 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)) 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' // // Find all links ending with '-wrapper.jar.sha256'
const wrapperChecksumLinks = $('a[href$="-wrapper.jar.sha256"]') const wrapperChecksumLinks = $('a[href$="-wrapper.jar.sha256"]')
wrapperChecksumLinks.each((index, element) => { wrapperChecksumLinks.each((_index, element) => {
const url = $(element).attr('href')! const url = $(element).attr('href')!
// Extract the version from the url // 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> { 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 cwd: projectRoot
}) })
console.log(`Gradle User Home initialized with commons_math3_version=${version} ${args}`) 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> { 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 cwd: projectRoot
}) })
console.log(`Gradle User Home initialized with commons_math3_version="${version}" ${args}`) console.log(`Gradle User Home initialized with commons_math3_version="${version}" ${args}`)