summaryrefslogtreecommitdiff
path: root/macros/src
diff options
context:
space:
mode:
Diffstat (limited to 'macros/src')
-rw-r--r--macros/src/main/scala/chisel3/internal/RangeTransform.scala1
-rw-r--r--macros/src/main/scala/chisel3/internal/RuntimeDeprecationTransform.scala4
-rw-r--r--macros/src/main/scala/chisel3/internal/naming/NamingAnnotations.scala10
-rw-r--r--macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala2
4 files changed, 7 insertions, 10 deletions
diff --git a/macros/src/main/scala/chisel3/internal/RangeTransform.scala b/macros/src/main/scala/chisel3/internal/RangeTransform.scala
index 0fdbff81..45aec923 100644
--- a/macros/src/main/scala/chisel3/internal/RangeTransform.scala
+++ b/macros/src/main/scala/chisel3/internal/RangeTransform.scala
@@ -27,7 +27,6 @@ object RangeTransform {
*
* @param c contains the string context to be parsed
*/
-//scalastyle:off cyclomatic.complexity method.length
class RangeTransform(val c: blackbox.Context) {
import c.universe._
def apply(args: c.Tree*): c.Tree = {
diff --git a/macros/src/main/scala/chisel3/internal/RuntimeDeprecationTransform.scala b/macros/src/main/scala/chisel3/internal/RuntimeDeprecationTransform.scala
index e1f528b3..dc0c8666 100644
--- a/macros/src/main/scala/chisel3/internal/RuntimeDeprecationTransform.scala
+++ b/macros/src/main/scala/chisel3/internal/RuntimeDeprecationTransform.scala
@@ -21,7 +21,7 @@ class RuntimeDeprecatedTransform(val c: Context) {
case q"new deprecated($desc, $since)" => desc
} match { // ensure there's only one and return it
case msg :: Nil => msg
- case _ => c.abort(c.enclosingPosition, s"@chiselRuntimeDeprecated annotion must be used with exactly one @deprecated annotation, got annotations $annotations") // scalastyle:ignore line.size.limit
+ case _ => c.abort(c.enclosingPosition, s"@chiselRuntimeDeprecated annotion must be used with exactly one @deprecated annotation, got annotations $annotations")
}
val message = s"$tname is deprecated: $annotationMessage"
val transformedExpr = q""" {
@@ -30,7 +30,7 @@ class RuntimeDeprecatedTransform(val c: Context) {
} """
q"$mods def $tname[..$tparams](...$paramss): $tpt = $transformedExpr"
}
- case other => c.abort(c.enclosingPosition, s"@chiselRuntimeDeprecated annotion may only be used on defs, got ${showCode(other)}") // scalastyle:ignore line.size.limit
+ case other => c.abort(c.enclosingPosition, s"@chiselRuntimeDeprecated annotion may only be used on defs, got ${showCode(other)}")
})
q"..$transformed"
}
diff --git a/macros/src/main/scala/chisel3/internal/naming/NamingAnnotations.scala b/macros/src/main/scala/chisel3/internal/naming/NamingAnnotations.scala
index bf4879ec..88baa2b1 100644
--- a/macros/src/main/scala/chisel3/internal/naming/NamingAnnotations.scala
+++ b/macros/src/main/scala/chisel3/internal/naming/NamingAnnotations.scala
@@ -78,7 +78,7 @@ class NamingTransforms(val c: Context) {
*/
class ClassBodyTransformer(val contextVar: TermName) extends ValNameTransformer {
override def transform(tree: Tree): Tree = tree match {
- case q"$mods class $tpname[..$tparams] $ctorMods(...$paramss) extends { ..$earlydefns } with ..$parents { $self => ..$stats }" => // scalastyle:ignore line.size.limit
+ case q"$mods class $tpname[..$tparams] $ctorMods(...$paramss) extends { ..$earlydefns } with ..$parents { $self => ..$stats }" =>
tree // don't recurse into inner classes
case q"$mods trait $tpname[..$tparams] extends { ..$earlydefns } with ..$parents { $self => ..$stats }" =>
tree // don't recurse into inner classes
@@ -164,7 +164,6 @@ class NamingTransforms(val c: Context) {
var namedElts: Int = 0
val transformed = annottees.map(annottee => annottee match {
- // scalastyle:off line.size.limit
case q"$mods class $tpname[..$tparams] $ctorMods(...$paramss) extends { ..$earlydefns } with ..$parents { $self => ..$stats }" => {
val transformedStats = transformClassBody(stats)
namedElts += 1
@@ -185,21 +184,20 @@ class NamingTransforms(val c: Context) {
if (namedElts != 1) {
c.abort(c.enclosingPosition, s"@chiselName annotation did not match exactly one valid tree, got:\r\n${annottees.map(tree => showCode(tree)).mkString("\r\n\r\n")}")
}
- // scalastyle:on line.size.limit
q"..$transformed"
}
}
@compileTimeOnly("enable macro paradise to expand macro annotations")
-class dump extends StaticAnnotation { // scalastyle:ignore class.name
+class dump extends StaticAnnotation {
def macroTransform(annottees: Any*): Any = macro chisel3.internal.naming.DebugTransforms.dump
}
@compileTimeOnly("enable macro paradise to expand macro annotations")
-class treedump extends StaticAnnotation { // scalastyle:ignore class.name
+class treedump extends StaticAnnotation {
def macroTransform(annottees: Any*): Any = macro chisel3.internal.naming.DebugTransforms.treedump
}
@compileTimeOnly("enable macro paradise to expand macro annotations")
-class chiselName extends StaticAnnotation { // scalastyle:ignore class.name
+class chiselName extends StaticAnnotation {
def macroTransform(annottees: Any*): Any = macro chisel3.internal.naming.NamingTransforms.chiselName
}
diff --git a/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala b/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala
index 6d7c3411..5231c2e9 100644
--- a/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala
+++ b/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala
@@ -106,7 +106,7 @@ abstract class AutoSourceTransform extends SourceInfoTransformMacro {
def doFuncTerm: TermName = {
val funcName = c.macroApplication match {
case q"$_.$funcName[..$_](...$_)" => funcName
- case _ => throw new Exception(s"Chisel Internal Error: Could not resolve function name from macro application: ${showCode(c.macroApplication)}") // scalastyle:ignore line.size.limit
+ case _ => throw new Exception(s"Chisel Internal Error: Could not resolve function name from macro application: ${showCode(c.macroApplication)}")
}
TermName("do_" + funcName)
}