Skip to content

Commit

Permalink
<chore> 迁移仓库名
Browse files Browse the repository at this point in the history
  • Loading branch information
TnoAlex committed Feb 24, 2024
1 parent 00e6e6c commit 456e26f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 39 deletions.
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ kotlin.code.style=official
mavenUsername=githubPuber
mavenPassword=meEFQ1$0tp!h%HNu

systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=7896
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=7896
#systemProp.http.proxyHost=127.0.0.1
#systemProp.http.proxyPort=7896
#systemProp.https.proxyHost=127.0.0.1
#systemProp.https.proxyPort=7896
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0'
}

rootProject.name = 'depends-smell'
rootProject.name = 'Eligos'
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,7 @@ class TooManyParametersProcessor : PsiProcessor {

@WiredConfig("function.arity")
private var arity: Int = 0


@EventListener
fun process(event: EntityRepoFinishedEvent) {
findTooManyParameters(event.source as Context)
(event.source as Context).reportIssues(issues)
issues.clear()
}


@EventListener
fun process(psiFile: PsiFile) {
when (psiFile) {
Expand Down Expand Up @@ -70,21 +62,4 @@ class TooManyParametersProcessor : PsiProcessor {
}
}
}

private fun findTooManyParameters(context: Context) {
val functionEntities = context.getRepo().getEntitiesByType(FunctionEntity::class.java)
val functionDependency = context.getDependencyMatrix(AnalysisHierarchyEnum.METHOD)
functionEntities.map { it as FunctionEntity }.filter {
it.parameters.size > arity
}.forEach {
val file = functionDependency!!.nodes.first { f ->
f.split("(")[1] == it.qualifiedName + ")"
}.split("(")[0]
val params = HashMap<String, String>()
it.parameters.forEach { p ->
if (p.rawType == null) return@forEach
params[p.rawName.name] = p.rawType.name
}
}
}
}
15 changes: 7 additions & 8 deletions src/main/resources/banner.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
__ __ __
/\ / _) \ \ \ \
/ \ ___ ______ \ \ ___ _ ______ ____ _ _ ___ \ \ \ \
/ /\ \ / __| __ ) _ \/ __) |/ / ._) / ._) | | / __) > \ > \
/ /__\ \> _) | || ( (_) > _)| / ( () ) ( () )| |_| > _) / ^ \ / ^ \
/________\___)|_||_|\___/\___)__/ \__/ \__/ | ._,_\___)_/ \_\/_/ \_\
| |
|_|

___________.__ .__
\_ _____/| | |__| ____ ____ ______
| __)_ | | | | / ___\ / _ \ / ___/
| \| |__| | / /_/ >( <_> ) \___ \
/_______ /|____/|__| \___ / \____/ /____ >
\/ /_____/ \/

0 comments on commit 456e26f

Please sign in to comment.