sbt/sbt-header
59.5
Adequate · 7 November 2026
1k
lines of production code
Scala
primary language
4
measurements over time
What this system is
Features
Support for configurable license header end years
Users can now explicitly configure the end year for license headers using the new \headerEndYear\ setting key. This allows for precise control over year ranges in generated headers, as demonstrated by the test case that sets a start year of 2015 and an end year of 2022, ensuring the resulting header reflects the specified range rather than relying solely on auto-detection.
src/sbt-test/sbt-header/auto-detection-end-year · high confidence
Behavioural changes
License detection logic updated for sbt 2.x compatibility
The license detection mechanism has been refactored to align with sbt 2.x changes. In Scala 2.12, the implementation now accepts licenses as a sequence of tuples (String, URL) and maps them against SPDX identifiers. In Scala 3, it directly accepts sbt.License objects, extracting the SPDX ID from the license instance. Additionally, a new PluginCompat layer provides version-specific helpers, including an uncached definition for sbt Def in Scala 2.12 and direct access to standard licenses (Apache2, MIT) in Scala 3.
src/main/scala-2.12, src/main/scala-3 · high confidence
Repository maintenance and configuration updates
This change updates the project's internal configuration and documentation. It introduces a \.git-blame-ignore-revs\ file to ignore specific scalafmt reformatting commits, adds a \.scala-steward.conf\ to pin the Scala library version, and updates \.scalafmt.conf\ to version 3.11.5 with new formatting rules. The \shell-prompt.sbt\ file is removed, and \.gitignore\ is expanded to include new tooling artifacts (VSCode, Metals, jenv). The README is significantly rewritten to document the plugin's features, configuration options, and built-in licenses, and the copyright year in the NOTICE file is updated to 2017.
(repo-wide) · high confidence
sbt-header plugin migrated to sbtheader package for sbt 2.x compatibility
The sbt-header plugin has been refactored and moved into the \sbtheader\ package to support sbt 2.x. This change introduces a new \AutomateHeaderPlugin\ that automatically applies license headers during compilation for \Compile\ and \Test\ configurations, while the core \HeaderPlugin\ retains manual control via \headerCreate\ and \headerCheck\ tasks. The implementation now uses Scala 3 source compatibility flags (\-Xsource:3\) and removes the deprecated \Traversable\ type alias, ensuring the plugin functions correctly in modern sbt environments.
src/main/scala · high confidence
Test coverage
Add integration tests for XML header handling; Added incremental header creation test suite; Added integration test for header tasks across all configurations; Added integration tests for header checking across all configurations; Added scripted tests for header creation and file mapping; Added test coverage for header insertion in files without extensions; Added test fixtures for file exclusion logic; Added test fixtures for header application on various file types; Added test fixtures for sbt-header validation; Added test for SPDX license header syntax; Added test for automatic license header detection; Added test for custom license header application; Added test for custom license header style detection; Added tests for overriding default header mappings; Added tests for sbt-header header checking; Added tests for source exclusion in header creation; Added unit tests for sbtheader comment styles, header creation, and license detection; Updated test fixtures for header mapping overrides.
Dependencies
Build system migrated to sbt 1.13 and modernized plugin suite
The project's build configuration has been significantly updated: the build tool version is upgraded from 0.13.7 to 1.13.0, and the legacy \sbt-scalariform\ and \sbt-git\ plugins are replaced with \sbt-ci-release\, \sbt-header\, and \sbt-scalafmt\. Additionally, the previous \Build.scala\ and \Dependencies.scala\ files are removed, indicating a shift in how build settings and dependencies are managed within the project structure.
project · high confidence
Upgrade to Scala 3.8.4 and sbt 2.0.8 with cross-build support
The build configuration has been updated to support cross-compilation for Scala 2.12.21 and Scala 3.8.4. The project now targets sbt 2.0.8 for Scala 3 builds and sbt 1.9.9 for Scala 2.12 builds, with scripted tests also running against sbt 1.11.6 for Scala 2.12. Test dependencies have been updated to ScalaTest 3.2.20, and the build now includes explicit license headers and developer metadata.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 59 → 59 (+0.0)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 76 → 76 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 53 → 53 (+0.0)
- Readiness 61 → 61 (+0.0)
- Security 70 → 70 (+0.0)
Resolved (5)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Inconsistent year parameter type across License companion objects. Most use String for the year, but LGPLv3Only and LGPLv3 use Method: LGPLv3Only.spdxIdentifier(): String (implying the apply might differ or be inconsistent with others) and LGPLv3 also uses Method: LGPLv3.spdxIdentifier(): String. More critically, SpdxLicense and specific license objects use String for years, while LicenseDetection uses Int. This creates confusion about whether years should be strings (for SPDX format) or integers (for calculation).
- Inconsistent year parameter types and arity. One overload accepts a single start year as a String, while the other accepts start and end years as Ints. This forces users to guess which overload to use based on year format and range, rather than a unified interface.
- Redundant abstraction layers. CommentStyle has apply methods that take a License object, but CommentCreator (which CommentStyle likely uses or wraps) only takes a String. This forces CommentStyle to extract text from License before delegating, or implies CommentStyle is a facade over CommentCreator. The existence of both CommentStyle and CommentCreator with overlapping responsibilities (creating comment text) is confusing.
Changes since last survey
- 1 commits — 1 feature/other, 0 fixes
By area
- project/build.properties — 1 commit
Notable commits
- change: Update sbt, scripted-plugin to 1.13.1
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
sbt/sbt-header was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 7 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit b62ead880425ac88512291bc4e93d44f7bcfc84e — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-5f8314471808.