Skip to content

Commit 811c423

Browse files
authored
Upgrade deps (#94)
* Upgrade deps * Fix codestyle
1 parent 61bc929 commit 811c423

File tree

2 files changed

+1287
-1347
lines changed

2 files changed

+1287
-1347
lines changed

src/utils/tree.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,18 @@ export const getResultsAsList = (
2424
analyzedEntities: FullyAnalyzedEntity[],
2525
limit?: number
2626
): FullyAnalyzedFile[] => {
27-
const flatFileResults: FullyAnalyzedFile[] = flattenEntireTree<
28-
FullyAnalyzedFile
29-
>(analyzedEntities)
30-
.filter((entity) => {
31-
return entity.type === 'file' && !!entity.complexityReport
32-
})
33-
// Sort by codehawk score, ascending (most complex files are first in the list)
34-
.sort((entityA, entityB) => {
35-
return (
36-
entityA.complexityReport.codehawkScore -
37-
entityB.complexityReport.codehawkScore
38-
)
39-
})
27+
const flatFileResults: FullyAnalyzedFile[] =
28+
flattenEntireTree<FullyAnalyzedFile>(analyzedEntities)
29+
.filter((entity) => {
30+
return entity.type === 'file' && !!entity.complexityReport
31+
})
32+
// Sort by codehawk score, ascending (most complex files are first in the list)
33+
.sort((entityA, entityB) => {
34+
return (
35+
entityA.complexityReport.codehawkScore -
36+
entityB.complexityReport.codehawkScore
37+
)
38+
})
4039

4140
return limit ? flatFileResults.slice(0, limit) : flatFileResults
4241
}

0 commit comments

Comments
 (0)