File tree Expand file tree Collapse file tree 2 files changed +1287
-1347
lines changed
Expand file tree Collapse file tree 2 files changed +1287
-1347
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments