Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from snyk/feat/ignore-comments
feat: ignore single-line comments in plugin search
- Loading branch information
Showing
18 changed files
with
108 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
ThisBuild / scalaVersion := "2.13.6" | ||
ThisBuild / organization := "com.example" | ||
|
||
lazy val hello = (project in file(".")) | ||
.settings( | ||
name := "Hello", | ||
libraryDependencies += "com.typesafe.play" %% "play-json" % "2.9.2", | ||
libraryDependencies += "com.eed3si9n" %% "gigahorse-okhttp" % "0.5.0", | ||
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.7" % Test, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import sbt._ | ||
|
||
object Dependencies { | ||
lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.0.5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.version=1.2.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* addDependencyTreePlugin | ||
hello, | ||
this is the comment that we want to ignore -> addDependencyTreePlugin <- Did it work? | ||
we shouldn't be taking these words into account (addDependencyTreePlugin) | ||
*/ | ||
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.8.2") /* addDependencyTreePlugin | ||
//// addDependencyTreePlugin | ||
*/ | ||
"http://nothing-to-see.com/uh-oh" /* addDependencyTreePlugin */ | ||
"http://nothing-to-see.com/uh-oh" /* addDependencyTreePlugin | ||
addDependencyTreePlugin | ||
*/ |
9 changes: 9 additions & 0 deletions
9
test/fixtures/multi-line-comments/src/main/scala/example/Hello.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package example | ||
|
||
object Hello extends Greeting with App { | ||
println(greeting) | ||
} | ||
|
||
trait Greeting { | ||
lazy val greeting: String = "hello" | ||
} |
9 changes: 9 additions & 0 deletions
9
test/fixtures/multi-line-comments/src/test/scala/example/HelloSpec.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package example | ||
|
||
import org.scalatest._ | ||
|
||
class HelloSpec extends FlatSpec with Matchers { | ||
"The Hello object" should "say hello" in { | ||
Hello.greeting shouldEqual "hello" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
ThisBuild / scalaVersion := "2.13.6" | ||
ThisBuild / organization := "com.example" | ||
|
||
lazy val hello = (project in file(".")) | ||
.settings( | ||
name := "Hello", | ||
libraryDependencies += "com.typesafe.play" %% "play-json" % "2.9.2", | ||
libraryDependencies += "com.eed3si9n" %% "gigahorse-okhttp" % "0.5.0", | ||
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.7" % Test, | ||
) |
5 changes: 5 additions & 0 deletions
5
test/fixtures/single-line-comments/project/Dependencies.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import sbt._ | ||
|
||
object Dependencies { | ||
lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.0.5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.version=1.2.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// hello, this is the comment that we want to ignore -> addDependencyTreePlugin <- Did it work? | ||
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.8.2") // addDependencyTreePlugin | ||
//// addDependencyTreePlugin | ||
|
||
"http://nothing-to-see.com/uh-oh" //addDependencyTreePlugin |
9 changes: 9 additions & 0 deletions
9
test/fixtures/single-line-comments/src/main/scala/example/Hello.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package example | ||
|
||
object Hello extends Greeting with App { | ||
println(greeting) | ||
} | ||
|
||
trait Greeting { | ||
lazy val greeting: String = "hello" | ||
} |
9 changes: 9 additions & 0 deletions
9
test/fixtures/single-line-comments/src/test/scala/example/HelloSpec.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package example | ||
|
||
import org.scalatest._ | ||
|
||
class HelloSpec extends FlatSpec with Matchers { | ||
"The Hello object" should "say hello" in { | ||
Hello.greeting shouldEqual "hello" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters