Skip to content

Commit 1065b31

Browse files
committed
feature: Add copy to Specification :breaking:
- Bump major version due to breaking changes in previous versions
1 parent e51d679 commit 1065b31

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
* @lolgab @ljmf00 @andreaTP @rtfpessoa @bmbferreira @DReigada @pedrocodacy
2-
3-
*.yml @h314to @paulopontesm
4-
1+
* @codacy/toss

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
val scala211 = "2.11.12"
2-
val scala212 = "2.12.8"
2+
val scala212 = "2.12.10"
33
val scala213 = "2.13.1"
44

55
name := "codacy-plugins-api"
@@ -9,7 +9,7 @@ scalaVersion := scala212
99

1010
crossScalaVersions := Seq(scala211, scala212, scala213)
1111

12-
libraryDependencies ++= Seq("org.specs2" %% "specs2-core" % "4.7.1" % Test)
12+
libraryDependencies ++= Seq("org.specs2" %% "specs2-core" % "4.8.3" % Test)
1313

1414
unmanagedSourceDirectories in Compile += {
1515
val sourceDir = (sourceDirectory in Compile).value

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.3.2
1+
sbt.version=1.3.6

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
resolvers += Resolver.jcenterRepo
22

3-
addSbtPlugin("com.codacy" % "codacy-sbt-plugin" % "17.1.2")
3+
addSbtPlugin("com.codacy" % "codacy-sbt-plugin" % "17.1.5")

src/main/scala/com/codacy/plugins/api/results/Pattern.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ object Pattern {
3535
val subcategory: Option[Subcategory]
3636
val parameters: Option[Set[Parameter.Specification]]
3737
val languages: Option[Set[Language]]
38+
39+
def copy(patternId: Pattern.Id = patternId,
40+
level: Result.Level = level,
41+
category: Category = category,
42+
subcategory: Option[Subcategory] = subcategory,
43+
parameters: Option[Set[Parameter.Specification]] = parameters,
44+
languages: Option[Set[Language]] = languages): Specification = {
45+
Specification(patternId, level, category, subcategory, parameters, languages)
46+
}
3847
}
3948

4049
object Specification {

0 commit comments

Comments
 (0)