Skip to content

Commit

Permalink
addressing lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmed3lmallah committed Nov 20, 2024
1 parent eee97d8 commit c89b41f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions src/deny.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ export async function getDeniedChanges(
): Promise<Change[]> {
const changesDenied: Change[] = []

let hasDeniedPackage = false
for (const change of changes) {
for (const denied of deniedPackages) {
if (
(!denied.version || change.version === denied.version) &&
change.name === denied.name
) {
changesDenied.push(change)
hasDeniedPackage = true
}
}

Expand All @@ -30,7 +28,6 @@ export async function getDeniedChanges(
}
if (namespace && namespace === denied.namespace) {
changesDenied.push(change)
hasDeniedPackage = true
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ async function run(): Promise<void> {
}
}

function printVulnerabilitiesBlock(
async function printVulnerabilitiesBlock(
addedChanges: Changes,
minSeverity: Severity,
warnOnly: boolean
Expand Down Expand Up @@ -253,7 +253,7 @@ function printChangeVulnerabilities(change: Change): boolean {
return change.vulnerabilities.length > 0
}

function printLicensesBlock(
async function printLicensesBlock(
invalidLicenseChanges: Record<string, Changes>,
warnOnly: boolean
): Promise<boolean> {
Expand Down Expand Up @@ -383,10 +383,10 @@ function printScannedDependencies(changes: Changes): void {
})
}

function printDeniedDependencies(
async function printDeniedDependencies(
changes: Changes,
config: ConfigurationOptions
): Promise<boolean> {
): Promise<boolean> {
return core.group('Denied', async () => {
let issueFound = false

Expand Down

0 comments on commit c89b41f

Please # to comment.