Skip to content

Commit

Permalink
Organize imports with IntelliJ
Browse files Browse the repository at this point in the history
  • Loading branch information
olafurpg committed Sep 19, 2018
1 parent c748ba5 commit 5d0cfdb
Show file tree
Hide file tree
Showing 47 changed files with 95 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package scala.meta.internal.scalafix

import scala.meta.Dialect
import scala.meta.Tree
import scala.meta.internal.trees.Origin
import scala.meta.dialects
import scala.meta.internal.trees.Origin

object ScalafixScalametaHacks {
def dialect(language: String): Dialect =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package scalafix.config

import metaconfig.{Conf, ConfDecoder}
import scalafix.v0.Symbol
import metaconfig.Conf
import metaconfig.ConfDecoder
import scalafix.internal.config.ScalafixMetaconfigReaders._
import scalafix.v0.Symbol

class CustomMessage[T](
val value: T,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package scalafix.internal.config

import scalafix.patch.Patch
import scalafix.patch.Patch.internal._
import metaconfig.ConfDecoder
import metaconfig.generic
import metaconfig.generic.Surface
import scalafix.patch.Patch
import scalafix.patch.Patch.internal._

case class ConfigRulePatches(
replaceSymbols: List[ReplaceSymbol] = Nil,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package scalafix.internal.config

import metaconfig.generic
import metaconfig.ConfDecoder
import metaconfig.generic
import metaconfig.generic.Surface

case class DebugConfig(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package scalafix.internal.config

import metaconfig._
import scala.meta.io.AbsolutePath
import scala.util.matching.Regex
import metaconfig._

case class FilterMatcher(
includeFilters: Regex,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package scalafix.internal.config

import scalafix.lint.LintSeverity
import metaconfig.ConfDecoder
import metaconfig.generic
import metaconfig.generic.Surface
import scalafix.lint.LintSeverity

case class LintConfig(
explain: Boolean = false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package scalafix.internal.config

import scala.{meta => m}
import metaconfig.Input
import metaconfig.Position
import metaconfig.Conf
import metaconfig.ConfDecoder
import metaconfig.ConfError
import metaconfig.Configured
import metaconfig.Input
import metaconfig.Position
import metaconfig.internal.ConfGet
import scala.{meta => m}

object MetaconfigOps {
def traverse[T](lst: Seq[Configured[T]]): Configured[List[T]] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package scalafix.internal.config
import java.io.PrintStream
import scala.meta.Position
import scalafix.internal.util.PositionSyntax._
import scalafix.lint.RuleDiagnostic
import scalafix.lint.LintSeverity
import scalafix.lint.RuleDiagnostic

/** A ScalafixReporter that emits messages to a PrintStream. */
case class PrintStreamReporter(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package scalafix.internal.config

import scala.reflect.ClassTag

import metaconfig.ConfDecoder
import metaconfig.Conf
import metaconfig.ConfDecoder
import metaconfig.ConfError
import metaconfig.Configured
import scala.reflect.ClassTag

object ReaderUtil {
def oneOf[T: ClassTag](options: sourcecode.Text[T]*): ConfDecoder[T] = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package scalafix.internal.config

import scala.meta._
import scala.meta.dialects.Scala212
import metaconfig._
import metaconfig.generic.Surface
import scala.meta._
import scala.meta.dialects.Scala212

case class ScalafixConfig(
parser: ParserConfig = ParserConfig(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
package scalafix.internal.config

import scala.meta.Ref
import scala.meta._
import scala.meta.parsers.Parse
import scalafix.v0.Symbol
import scala.reflect.ClassTag
import scala.util.Try
import scala.util.matching.Regex
import scalafix.patch.Patch.internal._
import java.io.OutputStream
import java.io.PrintStream
import java.net.URI
import java.util.regex.Pattern
import java.util.regex.PatternSyntaxException
import scala.util.control.NonFatal
import metaconfig.Conf
import metaconfig.ConfDecoder
import metaconfig.ConfError
import metaconfig.Configured
import metaconfig.Configured.Ok
import scala.meta.Ref
import scala.meta._
import scala.meta.parsers.Parse
import scala.reflect.ClassTag
import scala.util.Try
import scala.util.control.NonFatal
import scala.util.matching.Regex
import scalafix.internal.util.SymbolOps
import scalafix.patch.Patch.internal._
import scalafix.v0.Symbol
import scalafix.v0._

object ScalafixMetaconfigReaders extends ScalafixMetaconfigReaders
Expand All @@ -31,8 +31,8 @@ trait ScalafixMetaconfigReaders {
ReaderUtil.oneOf[MetaParser](parseSource, parseStat, parseCase)
}
implicit lazy val dialectReader: ConfDecoder[Dialect] = {
import scala.meta.dialects._
import ScalafixConfig.{DefaultDialect => Default}
import scala.meta.dialects._
ReaderUtil.oneOf[Dialect](
Default,
Scala211,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package scalafix.internal.config
import metaconfig.ConfDecoder
import metaconfig.ConfEncoder
import scala.meta.Position
import scalafix.lint.RuleDiagnostic
import scalafix.lint.LintSeverity
import scalafix.lint.RuleDiagnostic

trait ScalafixReporter {
private[scalafix] def report(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package scalafix.internal.diff

import scala.meta.inputs.Input
import scala.meta.Position

import scala.collection.mutable.StringBuilder

import scala.meta.Position
import scala.meta.inputs.Input
import scalafix.internal.util.IntervalSet

object DiffDisable {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package scalafix.internal.patch

import scala.meta.Classpath
import scalafix.v0.SemanticdbIndex
import scalafix.v0.Document
import scalafix.v0.SemanticdbIndex

trait CrashingSemanticdbIndex extends SemanticdbIndex {
final override def classpath: Classpath =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import scala.meta._
import scala.meta.contrib._
import scala.meta.tokens.Token
import scala.meta.tokens.Token.Comment
import scalafix.v0._
import scalafix.internal.config.FilterMatcher
import scalafix.internal.patch.EscapeHatch._
import scalafix.internal.util.LintSyntax._
import scalafix.lint.RuleDiagnostic
import scalafix.patch.Patch.internal._
import scalafix.rule.RuleName
import scalafix.util.TreeExtractors.Mods
import scalafix.internal.util.LintSyntax._
import scalafix.v0._

/** EscapeHatch is an algorithm to selectively disable rules. There
* are two mechanisms to do so: anchored comments and the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ package scalafix.internal.patch
import scala.annotation.tailrec
import scala.collection.mutable
import scala.meta._
import scalafix.v0.Symbol
import scalafix.v0.Signature
import scalafix.internal.util.SymbolOps
import scalafix.patch.Patch
import scalafix.patch.Patch.internal._
import scalafix.rule.RuleCtx
import scalafix.syntax._
import scalafix.util.Newline
import scalafix.util.SemanticdbIndex
import scalafix.v0.Signature
import scalafix.v0.Symbol

object ImportPatchOps {
object symbols {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ package scalafix.internal.patch

import scala.meta.Importee
import scala.meta.Importer
import scalafix.v0.Symbol
import scala.meta.Token
import scala.meta.Tree
import scala.meta.tokens.Tokens
import scalafix.v0._
import scalafix.patch.PatchOps
import LegacyPatchOps.DeprecationMessage
import scalafix.internal.patch.LegacyPatchOps.DeprecationMessage
import scalafix.internal.util.SymbolOps.Root
import scalafix.patch.Patch.internal._
import scalafix.patch.PatchOps
import scalafix.v0.Symbol
import scalafix.v0._

trait LegacyPatchOps extends PatchOps {
@deprecated(DeprecationMessage, "0.6.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import scalafix.patch._
import scalafix.syntax._
import scalafix.v0
import scalafix.v1
import scalafix.v1.SemanticDocument

object PatchInternals {
def merge(a: TokenPatch, b: TokenPatch): TokenPatch = (a, b) match {
Expand Down Expand Up @@ -165,5 +164,4 @@ object PatchInternals {
context)
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package scalafix.internal.patch

import scala.meta._
import scala.meta.internal.trees._
import scalafix.v0._
import scalafix.internal.util.SymbolOps.Root
import scalafix.internal.util.SymbolOps.SignatureName
import scalafix.patch.Patch
import scalafix.patch.Patch.internal.ReplaceSymbol
import scalafix.syntax._
import scalafix.v0._

object ReplaceSymbolOps {
private object Select {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import org.scalameta.logger
import scala.meta._
import scala.meta.contrib.AssociatedComments
import scala.meta.tokens.Tokens
import scalafix.v0._
import scalafix.syntax._
import scalafix.internal.config.ScalafixConfig
import scalafix.internal.diff.DiffDisable
import scalafix.internal.patch.LegacyPatchOps
import scalafix.internal.patch.EscapeHatch
import scalafix.internal.patch.LegacyPatchOps
import scalafix.syntax._
import scalafix.util.MatchingParens
import scalafix.util.SemanticdbIndex
import scalafix.util.TokenList
import scalafix.v0._

case class RuleCtxImpl(
tree: Tree,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package scalafix.internal.util

import java.lang.reflect.InvocationTargetException
import scalafix.v0.SemanticdbIndex
import metaconfig.ConfError
import metaconfig.Configured
import scala.reflect.ClassTag
import scala.util.Success
import scala.util.Try
import scalafix.v0.Rule
import metaconfig.ConfError
import metaconfig.Configured
import scalafix.v0.SemanticdbIndex

class ClassloadRule[T](classLoader: ClassLoader)(implicit ev: ClassTag[T]) {
private val t = ev.runtimeClass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package scalafix.internal.util

import scala.meta._
import scala.meta.Dialect
import scala.meta._
import scalafix.v0._

object DenotationOps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package scalafix.internal.util

import scala.collection.mutable
import scala.meta._
import scala.meta.internal.{semanticdb => s}
import scala.meta.internal.symtab._
import scala.meta.internal.{semanticdb => s}
import scalafix.internal.v0._
import scalafix.util.SemanticdbIndex
import scalafix.v0._
import scalafix.v0
import scalafix.v0._

case class EagerInMemorySemanticdbIndex(
database: Database,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package scalafix.internal.util

import scalafix.internal.config.ScalafixConfig
import scalafix.lint.RuleDiagnostic
import scalafix.lint.LintID
import scalafix.lint.Diagnostic
import scalafix.lint.LintID
import scalafix.lint.RuleDiagnostic
import scalafix.rule.RuleName

object LintSyntax {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package scalafix.internal.util

import scala.meta.internal.{semanticdb => s}
import scala.meta._
import scala.meta.internal.ScalametaInternals
import scala.meta.internal.{semanticdb => s}

object PositionSyntax {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package scalafix.internal.util

import scala.collection.mutable
import scala.meta._
import scala.meta.internal.symtab.SymbolTable
import scala.meta.internal.semanticdb.Scala._
import scala.meta.internal.semanticdb.SymbolInformation.{Kind => k}
import scala.meta.internal.semanticdb.SymbolInformation.{Property => p}
import scala.meta.internal.symtab.SymbolTable
import scala.meta.internal.{semanticdb => s}
import scala.util.control.NoStackTrace
import scala.util.control.NonFatal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package scalafix.internal.util
import org.typelevel.paiges._
import scala.meta.Tree
import scala.meta._
import scalafix.internal.util.DocConstants._
import scalafix.v1.Symbol
import scalafix.v1.SymbolInformation
import DocConstants._

object ProductLabeledStructure
extends ProductStructure(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package scalafix.internal.util

import scala.meta.inputs.Position
import scala.annotation.tailrec
import scala.meta.tokens.{Token, Tokens}
import scala.meta.inputs.Position
import scala.meta.tokens.Token
import scala.meta.tokens.Tokens
import scalafix.patch.Patch

object SuppressOps {
Expand Down
Loading

0 comments on commit 5d0cfdb

Please sign in to comment.