Skip to content

Commit

Permalink
styles: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Dec 26, 2023
1 parent dc03e56 commit 6d44fef
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cc.unitmesh.core.intelli

import cc.unitmesh.core.base.LLMCodeContext

class SimilarChunkContext(val language: String, val paths: List<String>?, val chunks: List<String>?) : LLMCodeContext {
class SimilarChunkContext(val language: String, private val paths: List<String>?, private val chunks: List<String>?) : LLMCodeContext {
override fun format(): String {
val commentPrefix = CommentService.getInstance().lineComment(language)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ data class WorkerContext(
val qualityThreshold: InsQualityThreshold = InsQualityThreshold(),
var compositionDependency: List<CompositionDependency> = listOf(),
) {

companion object {
@TestOnly
fun default(): WorkerContext {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class KotlinWorker(override val context: WorkerContext) : JavaWorker(context), L
override val jobs: MutableList<InstructionFileJob> = mutableListOf()

override val fileTree: HashMap<String, InstructionFileJob> = hashMapOf()
override val logger: Logger = org.slf4j.LoggerFactory.getLogger(JavaWorker::class.java)
override val logger: Logger = org.slf4j.LoggerFactory.getLogger(KotlinWorker::class.java)

override val packageRegex = Regex("package\\s+([a-zA-Z0-9_.]+)")
override val extLength = ".kt".length
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ class TypescriptWorker(override val context: WorkerContext) : LangWorker {

override fun prepareJob(job: InstructionFileJob) {
this.jobs.add(job)

// since the Java Analyser imports will be in data structures
try {
val container = TypeScriptAnalyser().analysis(job.code, job.fileSummary.location)
job.codeLines = job.code.lines()
Expand Down

0 comments on commit 6d44fef

Please sign in to comment.