Skip to content

Commit

Permalink
refactor: extract more data structure
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Dec 6, 2023
1 parent 714a8a5 commit a018e58
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cc.unitmesh.quality
package cc.unitmesh.quality.estimate

import org.archguard.scanner.analyser.count.FileJob
import org.archguard.scanner.analyser.count.LanguageSummary
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package cc.unitmesh.quality.testbadsmell

data class TbsResult(var results: Array<TestBadSmell>)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package cc.unitmesh.quality.testbadsmell

import kotlinx.serialization.Serializable

@Serializable
data class TestBadSmell(
var FileName: String = "",
var Type: String = "",
var Description: String = "",
var Line: Int = 0
)
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
package cc.unitmesh.quality
package cc.unitmesh.quality.testbadsmell

import chapi.domain.core.CodeAnnotation
import chapi.domain.core.CodeCall
import chapi.domain.core.CodeDataStruct
import chapi.domain.core.CodeFunction
import kotlinx.serialization.Serializable

@Serializable
data class TestBadSmell(
var FileName: String = "",
var Type: String = "",
var Description: String = "",
var Line: Int = 0
)
data class TbsResult(var results: Array<TestBadSmell>)

class TestBadsmellAnalyser(val nodes: List<CodeDataStruct>) {
fun analysis(): Array<TestBadSmell> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package cc.unitmesh.quality;

import cc.unitmesh.quality.EstimateAnalyser
import cc.unitmesh.quality.estimate.EstimateAnalyser
import org.junit.jupiter.api.Test
import java.io.File
import kotlin.test.assertEquals
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package cc.unitmesh.quality

import cc.unitmesh.quality.testbadsmell.TestBadsmellAnalyser
import chapi.ast.javaast.JavaAnalyser
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
Expand Down

0 comments on commit a018e58

Please sign in to comment.