Skip to content
CAI
Software that uses CAICheck a score

sds/overcommit

64.5

Adequate · 14 November 2026

8.1k

lines of production code

Ruby

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Gerrit Change-Id generation and repository tag indexing scripts

Two new utility scripts are now available in the libexec directory. The gerrit-change-id script automatically appends a unique Change-Id footer to commit messages when missing, ensuring compatibility with Gerrit code review workflows. The index-tags script generates a ctags index file for the repository, enabling easy navigation of code symbols in Vim (particularly when using Fugitive.vim). Also in this area: 1 commit (0 fixes) modifying libexec.

libexec · medium confidence · unverified

Add post-rewrite hooks for dependency installation and submodule status

This change introduces a new set of hooks that run automatically after git rebase, merge, or commit operations. Specifically, it adds support for running \bundle install\, \yarn install\, \npm install\, \bower install\, and \composer install\ to ensure dependencies are up to date after dependency files are modified. It also adds a \submodule\_status\ hook to check for uninitialized or out-of-date submodules, and an \index\_tags\ hook to update ctags indexes during rebases. These hooks share a common base class and implementation modules to reduce code duplication.

_lib/overcommit/hook/post\rewrite · high confidence

Initial implementation of the pre-commit hook framework and built-in hooks

This change introduces the core \Overcommit::Hook::PreCommit::Base\ class and a comprehensive suite of built-in pre-commit hooks (such as AuthorEmail, AuthorName, BundleCheck, EsLint, RuboCop, and many others). For users, this establishes the foundational structure for the pre-commit system, providing immediate out-of-the-box validation for code style, configuration files, and repository metadata without requiring external hook definitions.

_lib/overcommit/hook/pre\commit · high confidence

Initial release of Overcommit git hook framework

Overcommit is now available as a gem, providing a configurable framework for managing git hooks. It introduces a new command-line interface for installing, uninstalling, and running hooks, along with a configuration system that supports local overrides and signature verification to ensure hook integrity. The framework includes built-in hooks for tasks like code linting and branch protection, supports parallel execution for performance, and handles complex scenarios such as long argument lists and merge/cherry-pick states gracefully. Also in this area: 2 commits (1 fix) modifying overcommit; 1 commit (1 fix) fixing overcommit; 4 commits (0 fixes) modifying overcommit; Immediate cleanup of subprocess output files; Exempt URL-only lines from commit message width limits and remove Windows cmd.exe wrapping; and 4 more.

lib/overcommit, overcommit · medium confidence · unverified

Introduce ReplaceBranch hook to auto-prepend branch info to commit messages

Adds a new \ReplaceBranch\ hook for the \prepare-commit-msg\ stage that automatically prepends text to commit messages based on the current branch name. Users can configure a \branch\_pattern\ regex and a \replacement\_text\ (which can be a static string or a file path) to customize the prefix, such as adding issue IDs like \\[\#123\]\. The hook supports skipping execution for specific commit types (message, template, commit, merge, squash) via \skipped\_commit\_types\ and includes logic to avoid running on \--amend\ by default.

_lib/overcommit/hook/prepare\_commit\msg · high confidence

Introduce commit-msg hook support with new validation rules

Overcommit now supports commit-msg hooks, allowing users to validate commit messages at the time of creation. This release adds a suite of new hooks including CapitalizedSubject (enforcing capitalization), TextWidth (configurable line length limits), EmptyMessage (preventing empty commits), MessageFormat (custom regex patterns), SpellCheck, GerritChangeId, and others. The implementation introduces a new base class for commit-msg hooks and updates the hook context to support message inspection and modification.

_lib/overcommit/hook/commit\msg · high confidence

Introduce post-commit hooks for dependency installation and repository checks

This change adds a new \post\_commit\ hook category to Overcommit, allowing users to run checks and commands after a commit is created. The initial set of built-in hooks includes dependency installers for Bower, Bundler, Composer, NPM, and Yarn, which automatically run their respective install commands when dependency files change. Additionally, new hooks are provided to check submodule status, update ctags indexes, run git-guilt blame analysis, and enforce commit message styles via commitplease. A shared base class provides common context methods like \initial\_commit?\ to these hooks.

_lib/overcommit/hook/post\commit · high confidence

New post-checkout hooks for dependency installation and submodule status

This change introduces a new base class for post-checkout hooks and adds several new built-in hooks that run automatically after a checkout. Users can now configure Overcommit to automatically run \bundle install\, \npm install\, \yarn install\, \bower install\, and \composer install\ when dependencies change. Additionally, a new \SubmoduleStatus\ hook checks for uninitialized or out-of-date submodules, and an \IndexTags\ hook updates ctags indexes. A new \skip\_file\_checkout\ configuration option allows users to disable these hooks during file-specific checkouts.

_lib/overcommit/hook/post\_checkout, lib/overcommit/hook/post\merge · high confidence

New pre-rebase hook to prevent rebasing merged commits

A new pre-rebase hook has been added that prevents rebasing commits that have already been merged into specified target branches. This feature introduces a base class for pre-rebase hooks and a specific \MergedCommits\ implementation that checks if any commits being rebased are already present in configured branches (e.g., main or develop), failing the rebase if so. The hook allows rebasing when the HEAD is detached, as no references are changed in that state.

_lib/overcommit/hook/pre\rebase · high confidence

New shared hook implementations for dependency managers and linting tools

This location introduces a suite of new shared hook modules that enable Overcommit to run specific tooling during git operations. The diff adds shared logic for Bower, Bundler, Composer, NPM, and Yarn install hooks, which automatically execute the respective package manager when dependency files change. It also introduces shared hooks for RSpec (with support for filtering by applicable files), Rake targets (validating that targets are configured), Pronto linting (categorizing output as errors or warnings), Submodule status checks (detecting uninitialized or conflicted submodules), and Index tags (updating ctags in the background). These modules provide the core execution logic for the corresponding built-in hooks.

lib/overcommit/hook/shared · high confidence

Added two new utility modules to the codebase: \Overcommit::Utils::FileUtils\ and \Overcommit::Utils::MessagesUtils\. The \FileUtils\ module provides cross-platform support for symbolic links, implementing Windows-specific logic using \mklink\ and \dir\ commands via subprocesses while delegating to standard Ruby \File\ methods on other operating systems. The \MessagesUtils\ module introduces a robust parser for extracting file locations, line numbers, and error/warning types from linter output using configurable regular expressions and type categorizers, raising specific exceptions for malformed output. Also in this area: 5 commits (1 fix) modifying lib/overcommit; Exempt URL-only lines from commit message width limits and remove Windows cmd.exe wrapping.

lib/overcommit/utils · medium confidence · unverified

Removals

Removal of Ruby syntax pre-commit hook

The pre-commit hook script located in the hooks directory has been deleted. This script previously executed a Ruby syntax check on staged .rb files before allowing a commit. Its removal means that automatic syntax validation for Ruby code is no longer performed at commit time via this specific hook.

hooks · high confidence

Architecture

Establishes the main library entry point and core module structure

The library now exposes a central \lib/overcommit.rb\ file that serves as the primary entry point, requiring all core components including the OS detection module, configuration loaders and validators, hook runners and signers, git utilities, and the installer. This change consolidates the previously scattered or implicit loading logic into a single, explicit dependency graph, ensuring that all essential classes (such as \HookRunner\, \Configuration\, \GitConfig\, and \Installer\) are available when the gem is loaded.

lib · high confidence

Behavioural changes

28 commits (1 fix) modifying lib/overcommit/hook/pre\_push

A change to existing behaviour in lib/overcommit/hook/pre\_push — 28 commits (1 fix), 16 files: “Add support for golangci-lint \#680”; “Rename exclude\_remote\_names to exclude\_remotes”; “Add pronto to pre\_push hooks (\#706)”; and 25 more (refs \#680, \#706, \#466, \#802, \#463, …).

_lib/overcommit/hook/pre\push · medium confidence · unverified

4 commits (0 fixes) modifying script

A change to existing behaviour in script — 4 commits, 2 files: “Cut CI test time by 68% while preserving the full test matrix (\#913)”; “Shard CI tests across runners and add one required CI check (\#915)”; “Reach and enforce 100% aggregated branch coverage (\#943)”; and 1 more (refs \#913, \#915, \#943, \#939).

script · medium confidence · unverified

Add repository configuration and linting files

The repository now includes standard configuration files to enforce coding standards and manage local artifacts. An \.editorconfig\ file defines consistent coding styles (UTF-8, 2-space indentation, trailing whitespace removal) across editors. A \.gitignore\ file excludes build artifacts, coverage reports, and IDE-specific directories. A \.rubocop.yml\ file configures the RuboCop linter for Ruby 2.6+, disabling specific cops and setting line length limits, accompanied by a \.rubocop\_todo.yml\ file generated to track existing offenses. Additionally, the project's \.overcommit.yml\ configuration is established to enable and tune pre-commit hooks like RuboCop, BundleCheck, and TrailingWhitespace for this repository. The legacy \helper.rb\ script and the old \Rakefile\ installation tasks have been removed in favor of standard Bundler gem tasks.

(repo-wide) · high confidence

CLI now auto-loads Bundler context and handles gem resolution errors

The \overcommit\ binary now automatically detects a \gemfile\ specified in \.overcommit.yml\ and configures the Bundler environment before running. It gracefully handles gem loading issues, such as missing gems or version conflicts, by providing clear error messages and suggesting fixes like running \bundle install\. If a gem is already activated with a conflicting version, it automatically re-executes the command via \bundle exec\ to ensure consistency.

bin · high confidence

Enforce consistency of template directory hooks

A new pre-commit hook has been added to ensure that all hook files in the template directory match the content of the master 'overcommit-hook' file. This change replaces the previous symlink-based approach with a file-content comparison, resolving compatibility issues on Windows where symlinks are not supported. Users will now be notified if any template hook diverges from the master version, with instructions to copy the master hook to fix the mismatch.

.git-hooks · high confidence

The hook entry-point scripts in the template directory (commit-msg, overcommit-hook, post-checkout, post-commit, post-merge, post-rewrite, pre-commit, pre-push, pre-rebase, and prepare-commit-msg) are now installed as regular executable files rather than symlinks. This change ensures that the hook scripts are copied directly into the repository's .git/hooks directory, which improves compatibility with environments where symlinks are restricted or behave unexpectedly, while preserving the existing hook logic and behavior.

template-dir · high confidence

Improved handling of unstaged changes and amend operations in hook contexts

The hook context helpers now include new modules for managing file modifications and stashing unstaged changes. The \FileModifications\ helper ensures that when a commit is amended, hooks correctly identify files and line numbers changed in both the current and previous commit states. The \StashUnstagedChanges\ helper improves the reliability of stashing and restoring unstaged changes during hook execution, particularly by handling edge cases like initial commits and ensuring file modification times are preserved to avoid triggering unnecessary editor updates. These changes enhance the stability and accuracy of hook runs, especially when amending commits or dealing with complex working tree states. Also in this area: 3 commits (1 fix) modifying lib/overcommit.

_lib/overcommit/hook\context/helpers · medium confidence · unverified

Introduce HookContext abstraction for Git hook integration

The library now uses a dedicated \HookContext\ class hierarchy to manage the state and environment for each Git hook type (such as \PreCommit\, \CommitMsg\, \PrePush\, \PostMerge\, and others). This change provides a unified interface for accessing hook-specific data—like modified files, input lines, and commit messages—while handling necessary environment setup and cleanup (e.g., stashing changes) automatically. Users benefit from more robust and consistent hook execution, as the system now correctly adapts to the specific arguments and input streams provided by Git for each hook phase. Also in this area: 3 commits (1 fix) modifying lib/overcommit; 4 commits (0 fixes) modifying lib/overcommit/hook\_context.

_lib/overcommit/hook\context · medium confidence · unverified

Plugin hook signature verification and improved error reporting

Overcommit now verifies the integrity of custom plugin hooks before execution. If a plugin file or its configuration has been modified since it was last signed, the hook loader raises an error and instructs the user to run \overcommit --sign\ to update the signature, preventing the execution of potentially tampered or misconfigured code. Additionally, when loading hooks, the system now provides a clearer error message if a custom hook class does not inherit from the required base class, aiding in debugging configuration issues.

_lib/overcommit/hook\loader · high confidence

Test coverage

Add RSpec matchers for hook status and message validation; Add RSpec test suite with code coverage integration; Added comprehensive test suite for Overcommit core components; Added integration tests for Overcommit core features; Added test coverage for hook context classes; Added test coverage for new and updated pre-push hooks; Added test coverage for new post-commit hooks; Added test coverage for pre-commit hooks; Added test support helpers for Git, shell, and output handling; Added tests for Overcommit::Hook::Base behavior; Added tests for PrepareCommitMsg hook concurrency and ReplaceBranch configuration; Added tests for the pre-rebase merged commits hook.

Dependencies

Initial gem release with Ruby 2.6+ support and pinned RuboCop versions

This change introduces the initial gem specification and development environment for the Overcommit Git hook manager. It establishes a minimum Ruby version requirement of 2.6 and defines core runtime dependencies including \childprocess\ (\>= 0.6.3, \< 6), \iniparse\ (\~\> 1.4), and \rexml\ (\>= 3.4.2). The development setup includes RSpec 3 for testing, SimpleCov for code coverage, and a conditional pinning of RuboCop (1.50.0 for Ruby \< 2.7, 1.77.0 otherwise) to ensure consistent CI builds across supported Ruby versions.

(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

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 63 → 64 (+1.3)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 75 → 72 (-2.7)
  • Architecture 87 → 98 (+11.4)
  • Maturity 56 → 58 (+1.3)
  • Readiness 60 → 62 (+1.5)
  • Security 78 → 81 (+2.8)

Resolved (22)

  • Duplicated block (12 lines × 2) (lib/overcommit/configuration.rb)
  • Duplicated block (5 lines × 2) (lib/overcommit/hook/pre_commit/cook_style.rb)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Off-boarding risk: anonymized user #1
  • Orphaned file (lib/overcommit/hook/prepare_commit_msg/replace_branch.rb)
  • Orphaned file (lib/overcommit/hook_context/helpers/file_modifications.rb)
  • Orphaned file (lib/overcommit/hook_context/helpers/stash_unstaged_changes.rb)
  • Orphaned file (lib/overcommit/utils/messages_utils.rb)
  • PR-triggered workflow without a permissions block (.github/workflows/lint.yml)
  • PR-triggered workflow without a permissions block (.github/workflows/tests.yml)
  • Projects may be oversized for their cohesion
  • Test declared unreliable: spec/integration/resolving_cherry_pick_conflict_spec.rb (spec/integration/resolving_cherry_pick_conflict_spec.rb)
  • Test declared unreliable: spec/integration/resolving_cherry_pick_conflict_spec.rb (spec/integration/resolving_cherry_pick_conflict_spec.rb)
  • …and 2 more

New (15)

  • Edited copies of one member (3 members, 12+ corresponding lines) (lib/overcommit/hook/pre_commit/js_hint.rb)
  • Edited copy of a member (10 corresponding lines) (lib/overcommit/cli.rb)
  • Edited copy of a member (10 corresponding lines) (lib/overcommit/hook/pre_commit/golangci_lint.rb)
  • Edited copy of a member (10 corresponding lines) (lib/overcommit/hook/pre_commit/json_syntax.rb)
  • Edited copy of a member (11 corresponding lines) (lib/overcommit/hook/pre_commit/php_cs.rb)
  • Edited copy of a member (22 corresponding lines) (lib/overcommit/hook/pre_commit/php_cs_fixer.rb)
  • Edited copy of a member (6 corresponding lines) (lib/overcommit/hook/pre_commit/yaml_lint.rb)
  • Edited copy of a member (8 corresponding lines) (lib/overcommit/hook/pre_commit/ruby_lint.rb)
  • Edited copy of a member (8 corresponding lines) (lib/overcommit/hook/pre_commit/sqlint.rb)
  • Edited copy of a member (9 corresponding lines) (lib/overcommit/hook/pre_commit/css_lint.rb)
  • Edited copy of a member (9 corresponding lines) (lib/overcommit/hook/pre_commit/hlint.rb)
  • Edited copy of a member (9 corresponding lines) (lib/overcommit/hook/pre_commit/rails_best_practices.rb)
  • Low cohesion: CommitMsg (LCOM4 4) (lib/overcommit/hook_context/commit_msg.rb)
  • No ADRs found (overcommit.gemspec)
  • Off-boarding risk: anonymized user #1

Changes since last survey

  • 43 commits — 39 feature/other, 4 fixes

By area

  • (root) — 15 commits
  • lib/overcommit — 15 commits
  • spec/overcommit — 6 commits
  • .github/workflows — 5 commits
  • spec/integration — 1 commit
  • template-dir/hooks — 1 commit

Notable commits

  • fix: Bump version to 0.76.0 and fix spell-check temp file lifetime (#938)
  • fix: Fix all open CodeQL security findings (#941)
  • fix: Re-enable the full Windows test matrix and fix platform failures (#911)
  • fix: Reach 100% line coverage and fix absolute-path command signing (#933)
  • change: 750: Teach ad-hoc hooks line parsing (#757)
  • change: Add configurable Vale pre-commit hook (#758)
  • change: Add note about disabling default hooks (#922)
  • change: Add opt-in advisory database updates to BundleAudit (#934)
  • change: Allocate more CI runners to Windows with asymmetric sharding (#916)
  • change: Avoid PowerShell startup for Windows parent command queries (#918)
  • change: Avoid repeated CLI startup when preparing integration fixtures (#917)
  • change: Cache Windows dependency resolution with daily refreshes (#919)
  • change: Close files inspected by LineEndings (#921)
  • change: Cut CI test time by 68% while preserving the full test matrix (#913)
  • change: Cut version 0.74.0 (#906)
  • change: Cut version 0.75.0 (#912)
  • change: Cut version 0.76.0 (#937)
  • change: Document missing bundle dependencies during checkout and rebase (#936)
  • change: Document the case-sensitive KtLint hook name (#927)
  • change: Enable SimpleCov branch coverage (#942)
  • …and 23 more

Architecture

  • Containers 0 added · 0 removed · contexts 1 added · 0 removed · edges 0 added · 0 removed

Added bounded contexts (1)

  • overcommit

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

sds/overcommit 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 14 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 a13e287a2a6209622c791a59e4dbc2b7292bec58 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — 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.65+preprod-e1a3b69fc8ee.