diff options
| author | Leway Colin | 2019-06-19 05:22:47 +0800 |
|---|---|---|
| committer | Adam Izraelevitz | 2019-06-18 14:22:47 -0700 |
| commit | fb4133cd76600cc8707e9a7b2f639cf120bd825c (patch) | |
| tree | 7532f341dc95f293fa02e4d015d1a6a0fac102ba /src/main/scala/firrtl/passes/Checks.scala | |
| parent | d1d422670eb406567b2e34d7036a5cc0262309a1 (diff) | |
Use scalafix to remove unused import and deprecated procedure syntax (#1074)
* Add sbt-scalafix
* Add scalafix guide to README
* Remove Unused Import
* Remove deprecated procedure syntax
Diffstat (limited to 'src/main/scala/firrtl/passes/Checks.scala')
| -rw-r--r-- | src/main/scala/firrtl/passes/Checks.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/scala/firrtl/passes/Checks.scala b/src/main/scala/firrtl/passes/Checks.scala index 1268a149..e28116ea 100644 --- a/src/main/scala/firrtl/passes/Checks.scala +++ b/src/main/scala/firrtl/passes/Checks.scala @@ -63,8 +63,8 @@ object CheckHighForm extends Pass { val moduleGraph = new ModuleGraph val moduleNames = (c.modules map (_.name)).toSet - def checkHighFormPrimop(info: Info, mname: String, e: DoPrim) { - def correctNum(ne: Option[Int], nc: Int) { + def checkHighFormPrimop(info: Info, mname: String, e: DoPrim): Unit = { + def correctNum(ne: Option[Int], nc: Int): Unit = { ne match { case Some(i) if e.args.length != i => errors.append(new IncorrectNumArgsException(info, mname, e.op.toString, i)) @@ -99,7 +99,7 @@ object CheckHighForm extends Pass { } } - def checkFstring(info: Info, mname: String, s: StringLit, i: Int) { + def checkFstring(info: Info, mname: String, s: StringLit, i: Int): Unit = { val validFormats = "bdxc" val (percent, npercents) = s.string.foldLeft((false, 0)) { case ((percentx, n), b) if percentx && (validFormats contains b) => @@ -203,7 +203,7 @@ object CheckHighForm extends Pass { p.tpe foreach checkHighFormW(p.info, mname) } - def checkHighFormM(m: DefModule) { + def checkHighFormM(m: DefModule): Unit = { val names = new NameSet m foreach checkHighFormP(m.name, names) m foreach checkHighFormS(m.info, m.name, names) |
