Skip to content

Commit 9db9077

Browse files
committed
updated scala style config to ignore all model files since they are generated / copied from the instance registry
1 parent a0cd522 commit 9db9077

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

build.sbt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ lazy val management = (project in file(".")).enablePlugins(SbtWeb).enablePlugins
1212
.enablePlugins(BuildInfoPlugin).
1313
settings(
1414
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion),
15-
buildInfoPackage := "de.upb.cs.swt.delphi.management"
15+
buildInfoPackage := "de.upb.cs.swt.delphi.management",
16+
(scalastyleSources in Compile) := {
17+
// all .scala files in "src/main/scala"
18+
val scalaSourceFiles = ((scalaSource in Compile).value ** "*.scala").get
19+
val fSep = java.io.File.separator // "/" or "\"
20+
val dirNameToExclude = "app" + fSep + "models" // "com/folder_to_exclude"
21+
scalaSourceFiles.filterNot(_.getAbsolutePath.contains(dirNameToExclude))
22+
}
1623
)
1724

1825
scalastyleConfig := baseDirectory.value / "project" / "scalastyle-config.xml"

project/scalastyle-config.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,13 @@
155155
<parameter name="regex"><![CDATA[^[A-Z_]$]]></parameter>
156156
</parameters>
157157
</check>
158-
<check level="warning" class="org.scalastyle.scalariform.UnderscoreImportChecker" enabled="true"></check>
158+
<check level="warning" class="org.scalastyle.scalariform.UnderscoreImportChecker" enabled="false"></check>
159159
<check level="warning" class="org.scalastyle.scalariform.LowercasePatternMatchChecker" enabled="true"></check>
160160
<check level="warning" class="org.scalastyle.scalariform.MultipleStringLiteralsChecker" enabled="true">
161161
<parameters>
162162
<parameter name="allowed"><![CDATA[3]]></parameter>
163163
<parameter name="ignoreRegex"><![CDATA[^""$]]></parameter>
164164
</parameters>
165165
</check>
166-
<check level="warning" class="org.scalastyle.scalariform.ImportGroupingChecker" enabled="true"></check>
166+
<check level="warning" class="org.scalastyle.scalariform.ImportGroupingChecker" enabled="false"></check>
167167
</scalastyle>

0 commit comments

Comments
 (0)