scala
4 guardrails, all at version v1.
| Guardrail | Default severity | What it checks |
|---|---|---|
scala/dependencies-pinned | warning | Every library dependency found in the build names a literal revision. build.sbt is Scala code read by pattern, so a dependency built by a function, added inside a condition or held in a variable isn't detected, and the list may be incomplete. |
scala/no-snapshot-dependencies | error | No library dependency found in the build is a -SNAPSHOT. build.sbt is Scala code read by pattern, so dependencies it declares indirectly aren't detected, and the list may be incomplete. |
scala/sbt-version-pinned | warning | project/build.properties pins the sbt version the build runs with, instead of leaving it to whichever launcher the machine has. |
scala/version-declared | warning | The build declares the Scala version it compiles against, and that version is no older than the configured floor. |
Shared inputs
Every scala guardrail declares these inputs. Individual guardrails can add their own.
| Input | Description | Default |
|---|---|---|
projectDir | Directory holding the project, relative to the directory the CLI runs in. | . |
Shared collectors
Every scala guardrail receives the facts these collectors gather. Individual guardrails can ask for more collectors of their own.
| Collector | Gathers |
|---|---|
scala | The sbt build in the project directory: the Scala and sbt versions it pins, every subproject the reader saw, the library dependencies each build file names with their configurations, and the plugins the build itself runs. build.sbt is Scala rather than a declaration, so what it declares indirectly is not seen and scanned says so. |
You configure every guardrail in this category the same way, in the guardrails.checks array of buildnote.json. Configuring guardrails lists every option, and Guardrails lets you search the whole library.