Test & Code

157: pre-commit - Anthony Sottile


Listen Later

pre-commit started as a framework for running linters and code formatters during git actions via git hooks. It's grown and expanded and now supports an extensive list of languages and actions and manual running of actions. But even at it's core, it's great for letting computers nitpick about whitespace and formatting, so that code reviews can focus on architecture and design.

Anthony Sottile discusses pre-commit, for using locally by developers, and pre-commit.ci, which can run actions during merge requests.

"Git hook scripts are useful for identifying simple issues before submission to code review. We run our hooks on every commit to automatically point out issues in code such as missing semicolons, trailing whitespace, and debug statements. By pointing these issues out before code review, this allows a code reviewer to focus on the architecture of a change while not wasting time with trivial style nitpicks." - pre-commit.com

"Developers spend a fair chunk of time during their development flow fixing relatively trivial problems in their code. pre-commit.ci both enforces that these issues are discovered, which is opt in for each developer workflow via pre-commit, but also fixes the issues automatically, letting developers focus their time on more valuable problems." - A user of pre-commit.ci


Links:

  • pre-commit
  • pre-commit supported hooks
  • pre-commit.ci



...more
View all episodesView all episodes
Download on the App Store

Test & CodeBy Brian Okken

  • 4.7
  • 4.7
  • 4.7
  • 4.7
  • 4.7

4.7

70 ratings


More shows like Test & Code

View all
Software Engineering Radio - the podcast for professional software developers by se-radio@computer.org

Software Engineering Radio - the podcast for professional software developers

270 Listeners

The Changelog: Software Development, Open Source by Changelog Media

The Changelog: Software Development, Open Source

283 Listeners

Thoughtworks Technology Podcast by Thoughtworks

Thoughtworks Technology Podcast

42 Listeners

Data Skeptic by Kyle Polich

Data Skeptic

478 Listeners

Talk Python To Me by Michael Kennedy

Talk Python To Me

583 Listeners

Software Engineering Daily by Software Engineering Daily

Software Engineering Daily

626 Listeners

Soft Skills Engineering by Jamison Dance and Dave Smith

Soft Skills Engineering

282 Listeners

Python Bytes by Michael Kennedy and Brian Okken

Python Bytes

214 Listeners

Data Engineering Podcast by Tobias Macey

Data Engineering Podcast

141 Listeners

Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

Syntax - Tasty Web Development Treats

986 Listeners

Practical AI by Practical AI LLC

Practical AI

191 Listeners

The Stack Overflow Podcast by The Stack Overflow Podcast

The Stack Overflow Podcast

65 Listeners

The Real Python Podcast by Real Python

The Real Python Podcast

141 Listeners

Oxide and Friends by Oxide Computer Company

Oxide and Friends

58 Listeners

The Pragmatic Engineer by Gergely Orosz

The Pragmatic Engineer

61 Listeners