• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sds / overcommit / 13043089062
91%
master: 91%

Build:
Build:
LAST BUILD BRANCH: solargraph-change-output-format
DEFAULT BRANCH: master
Ran 30 Jan 2025 12:27AM UTC
Jobs 6
Files 219
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Jan 2025 12:26AM UTC coverage: 91.009% (+0.08%) from 90.932%
13043089062

push

github

web-flow
Add `-diff` cli option for running precommit hooks against diffs (#860)

For example, running `overcommit --diff main` from a feature branch will
run pre-commit hooks against the diff between the two branches.

I was able to very easily leverage existing code for the bulk of the
feature - this is mainly just adding the cli option, a hook context to
do the execution and some tests based on the existing `--run-all` test.

---

For background, my team is responsible for a couple of really old,
really large rails apps. Getting them completely in compliance with our
various linters is a huge task that isn't getting done anytime soon
(things are funky to the point that we've even observed breakages with
"safe" auto-correct functions).

I introduced/started heavily encouraging overcommit so that we at least
don't add _new_ linting offenses and things will naturally improve over
time. It's been great, but offenses still slip through though here and
there, especially with juniors who might be getting away with not having
a local install (and/or abusing `OVERCOMMIT_DISABLE=1`).

An option like this would allow me to leverage the very useful "only
apply to changed lines" logic within a ci environment and help enforce
my desired "no new linting offenses" policy.

34 of 34 new or added lines in 4 files covered. (100.0%)

3229 of 3548 relevant lines covered (91.01%)

2006.13 hits per line

Jobs
ID Job ID Ran Files Coverage
1 ruby3.1-ubuntu - 13043089062.1 30 Jan 2025 12:27AM UTC 438
90.93
GitHub Action Run
2 ruby3.3-ubuntu - 13043089062.2 30 Jan 2025 12:27AM UTC 438
90.98
GitHub Action Run
3 ruby2.6-ubuntu - 13043089062.3 30 Jan 2025 12:27AM UTC 438
90.96
GitHub Action Run
4 ruby3.2-ubuntu - 13043089062.4 30 Jan 2025 12:27AM UTC 438
90.93
GitHub Action Run
5 ruby2.7-ubuntu - 13043089062.5 30 Jan 2025 12:27AM UTC 438
90.96
GitHub Action Run
6 ruby3.0-ubuntu - 13043089062.6 30 Jan 2025 12:27AM UTC 438
90.96
GitHub Action Run
Source Files on build 13043089062
  • Tree
  • List 219
  • Changed 217
  • Source Changed 3
  • Coverage Changed 217
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #13043089062
  • b4d4ce0e on github
  • Prev Build on main (#12996777043)
  • Next Build on main (#13043172452)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc