8000 GitHub - hiroshi-cl/unused-code: find and remove unused scala code
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

hiroshi-cl/unused-code

 
 

Repository files navigation

Unused Code

maven scaladoc

find and warn, remove unused public classes, methods by scalafix SyntacticRule.

setup

project/plugins.sbt

addSbtPlugin("com.github.xuwei-k" % "unused-code-plugin" % "version")

sbt shell

> unusedCode
> scalafix WarnUnusedCode
> scalafix RemoveUnusedCode

config example

build.sbt

import scala.concurrent.duration.*

Global / unusedCodeConfig ~= { c =>
  c.copy(
    excludeNameRegex = Set(
      ".*Server"
    ),
    excludePath = c.excludePath ++ Set(
      "glob:some-project/**"
    ),
    excludeGitLastCommit = Some(
      365.days
    ),
    excludeMainMethod = false,
    dialect = unused_code.Dialect.Scala3,
  )
}

About

find and remove unused scala code

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 99.9%
  • Java 0.1%
0