ProjectRoot

io.shiftleft.utils.ProjectRoot$
object ProjectRoot

Finds the relative location of the project root.

Used in tests which rely on the working directory - unfortunately Intellij and sbt have different default working directories for executing tests from subprojects: while sbt defaults to the project root, intellij defaults to the subproject.

Previously a consistent behaviour was achieved by setting Test / baseDirectory := (ThisBuild / Test / run / baseDirectory).value, however that broke the bsp build within Intellij - it simply wouldn't recognise subprojects with this setting any more.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

object SearchDepthExceededError extends Error

Attributes

Supertypes
class Error
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type

Value members

Concrete methods

def find: File
def findRelativePath: String
def relativise(path: String): String