File tree Expand file tree Collapse file tree 5 files changed +99
-108
lines changed Expand file tree Collapse file tree 5 files changed +99
-108
lines changed Original file line number Diff line number Diff line change @@ -15,21 +15,13 @@ class Extractor : ExtractorInterface {
15
15
val TYPE_SYNTAX = 4
16
16
val SEPARATOR = " >"
17
17
val RESTRICTED_EXTS = listOf (" .min.js" )
18
-
19
- fun getAllExtensions (): HashSet <String > {
20
- return Heuristics
21
- .map { (ext, _) -> ext }
22
- .toHashSet()
23
- }
24
18
}
25
19
26
20
override fun extract (files : List <DiffFile >): List <CommitStats > {
27
21
return files
28
22
.filter { file -> ! RESTRICTED_EXTS .contains(file.extension) }
29
23
.mapNotNull { file ->
30
- val extractor = Heuristics .get(file.extension)
31
- if (extractor != null ) extractor(file.new.content)?.extract(listOf (file))
32
- else null
24
+ Heuristics .analyze(file)
33
25
}
34
26
.fold(mutableListOf ()) { accStats, stats ->
35
27
accStats.addAll(stats)
You can’t perform that action at this time.
0 commit comments