Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Remove scalastyle configs from repository #1767

Merged
merged 2 commits into from
Jul 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ test-scala:

jenkins-build: clean
$(SBT) $(SBT_FLAGS) +clean +test +publish-local
$(SBT) $(SBT_FLAGS) scalastyle coverage test
$(SBT) $(SBT_FLAGS) coverageReport

.PHONY: build clean regress build-scala test-scala
2 changes: 0 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")

addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3")

addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")
Expand Down
110 changes: 0 additions & 110 deletions scalastyle-config.xml

This file was deleted.

109 changes: 0 additions & 109 deletions scalastyle-test-config.xml

This file was deleted.

2 changes: 0 additions & 2 deletions src/main/scala/firrtl/Compiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ sealed abstract class CircuitForm(private val value: Int) extends Ordered[Circui
def outputSuffix: String
}

// scalastyle:off magic.number
// These magic numbers give an ordering to CircuitForm
/** Chirrtl Form
*
Expand Down Expand Up @@ -191,7 +190,6 @@ final case object UnknownForm extends CircuitForm(-1) {

val outputSuffix: String = ".unknown.fir"
}
// scalastyle:on magic.number

// Internal utilities to keep code DRY, not a clean interface
private[firrtl] object Transform {
Expand Down
1 change: 0 additions & 1 deletion src/main/scala/firrtl/Driver.scala
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ object Driver {
* @param optionsManager use optionsManager config to load annotation files
* @return Annotations read from files
*/
//scalastyle:off cyclomatic.complexity method.length
def getAnnotations(
optionsManager: ExecutionOptionsManager with HasFirrtlOptions
): Seq[Annotation] = {
Expand Down
2 changes: 0 additions & 2 deletions src/main/scala/firrtl/annotations/Annotation.scala
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ private[firrtl] object LegacyAnnotation {
import firrtl.passes.clocklist._

// Attempt to convert common Annotations and error on the rest of old-style build-in annotations
// scalastyle:off
def convertLegacyAnno(anno: LegacyAnnotation): Annotation = anno match {
// All old-style Emitter annotations are illegal
case LegacyAnnotation(_,_,"emitCircuit") => errorIllegalAnno("EmitCircuitAnnotation")
Expand Down Expand Up @@ -236,7 +235,6 @@ private[firrtl] object LegacyAnnotation {
OptimizableExtModuleAnnotation(c)
case other => other
}
// scalastyle:on
def convertLegacyAnnos(annos: AnnotationSeq): AnnotationSeq = {
var warned: Boolean = false
annos.map {
Expand Down
2 changes: 0 additions & 2 deletions src/main/scala/firrtl/ir/IR.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ case object NoInfo extends Info {
}
case class FileInfo(info: StringLit) extends Info {
override def toString: String = " @[" + info.serialize + "]"
//scalastyle:off method.name
def ++(that: Info): Info = if (that == NoInfo) this else MultiInfo(Seq(this, that))
}
case class MultiInfo(infos: Seq[Info]) extends Info {
Expand All @@ -38,7 +37,6 @@ case class MultiInfo(infos: Seq[Info]) extends Info {
if (parts.nonEmpty) parts.map(_.serialize).mkString(" @[", " ", "]")
else ""
}
//scalastyle:off method.name
def ++(that: Info): Info = if (that == NoInfo) this else MultiInfo(infos :+ that)
}
object MultiInfo {
Expand Down
2 changes: 0 additions & 2 deletions src/main/scala/firrtl/ir/Serializer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ object Serializer {

private def s(str: StringLit)(implicit b: StringBuilder, indent: Int): Unit = b ++= str.serialize

//scalastyle:off cyclomatic.complexity
private def s(node: Expression)(implicit b: StringBuilder, indent: Int): Unit = node match {
case Reference(name, _, _, _) => b ++= name
case DoPrim(op, args, consts, _) =>
Expand All @@ -78,7 +77,6 @@ object Serializer {
case firrtl.EmptyExpression => b ++= "EMPTY"
}

//scalastyle:off cyclomatic.complexity method.length
private def s(node: Statement)(implicit b: StringBuilder, indent: Int): Unit = node match {
case DefNode(info, name, value) => b ++= "node " ; b ++= name ; b ++= " = " ; s(value) ; s(info)
case Connect(info, loc, expr) => s(loc) ; b ++= " <= " ; s(expr) ; s(info)
Expand Down
9 changes: 0 additions & 9 deletions src/main/scala/firrtl/ir/StructuralHash.scala
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ object StructuralHash {
// see: https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html
private val SHA256 = "SHA-256"

//scalastyle:off cyclomatic.complexity
private def hash(node: FirrtlNode, h: Hasher, rename: String => String): Unit = node match {
case n : Expression => new StructuralHash(h, rename).hash(n)
case n : Statement => new StructuralHash(h, rename).hash(n)
Expand All @@ -74,7 +73,6 @@ object StructuralHash {
case n : Circuit => hashCircuit(n, h, rename)
case n : StringLit => h.update(n.toString)
}
//scalastyle:on cyclomatic.complexity

private def hashModuleAndPortNames(m: DefModule, h: Hasher, rename: String => String): Unit = {
val sh = new StructuralHash(h, rename)
Expand Down Expand Up @@ -190,8 +188,6 @@ class StructuralHash private(h: Hasher, renameModule: String => String) {
@inline private def hash(i: BigDecimal): Unit = h.update(i)
@inline private def hash(s: String): Unit = h.update(s)

//scalastyle:off magic.number
//scalastyle:off cyclomatic.complexity
private def hash(node: Expression): Unit = node match {
case Reference(name, _, _, _) => id(0) ; n(name)
case DoPrim(op, args, consts, _) =>
Expand Down Expand Up @@ -227,9 +223,7 @@ class StructuralHash private(h: Hasher, renameModule: String => String) {
case firrtl.VRandom(width) => id(13) ; hash(width)
// ids 14 ... 19 are reserved for future Expression nodes
}
//scalastyle:on cyclomatic.complexity

//scalastyle:off cyclomatic.complexity method.length
private def hash(node: Statement): Unit = node match {
// all info fields are ignore
case DefNode(_, name, value) => id(20) ; n(name) ; hash(value)
Expand Down Expand Up @@ -282,7 +276,6 @@ class StructuralHash private(h: Hasher, renameModule: String => String) {
id(36) ; hash(StructuralHash.verificationOp(op)) ; hash(clk) ; hash(pred) ; hash(en) ; hash(msg.string)
// ids 37 ... 39 are reserved for future Statement nodes
}
//scalastyle:on cyclomatic.complexity method.length

// ReadUnderWrite is never used in place of a FirrtlNode and thus we can start a new id namespace
private def hash(ruw: ReadUnderWrite.Value): Unit = ruw match {
Expand Down Expand Up @@ -316,7 +309,6 @@ class StructuralHash private(h: Hasher, renameModule: String => String) {
id(48) ; hash(node.flip) ; hash(node.tpe)
}

//scalastyle:off cyclomatic.complexity
private def hash(node: Type): Unit = node match {
// Types
case UIntType(width: Width) => id(50) ; hash(width)
Expand All @@ -332,7 +324,6 @@ class StructuralHash private(h: Hasher, renameModule: String => String) {
case IntervalType(lower, upper, point) => id(60) ; hash(lower) ; hash(upper) ; hash(point)
// ids 61 ... 65 are reserved for future Type nodes
}
//scalastyle:on cyclomatic.complexity

private def hash(node: Direction): Unit = node match {
case Input => id(66)
Expand Down
2 changes: 0 additions & 2 deletions src/main/scala/firrtl/options/StageUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ object StageUtils {
/** Print a warning message (in yellow)
* @param message error message
*/
//scalastyle:off regex
def dramaticWarning(message: String): Unit = {
println(Console.YELLOW + "-"*78)
println(s"Warning: $message")
Expand All @@ -19,7 +18,6 @@ object StageUtils {
* @param message error message
* @note This does not stop the Driver.
*/
//scalastyle:off regex
def dramaticError(message: String): Unit = {
println(Console.RED + "-"*78)
println(s"Error: $message")
Expand Down
Loading