Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
The GitHub code base is growing at over 25% every year through contributions from over 1000 engineers, clocking in at 1.7+ million lines of Ruby. In this talk, we'll share how we use linters to keep our codebase healthy by ensuring best practices are applied consistently, feedback loops are as short as possible, and code reviews bring the most value, all without creating too much friction.
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
This talk by Joel Hawksley at RubyConf 2021 explores how GitHub utilizes linters to maintain the health of its codebase, which is extensive and growing rapidly due to contributions from numerous engineers. The presentation highlights the importance of linters, defines what they are, and discusses various types used at GitHub, all while providing real examples and insights on their effectiveness and the challenges faced. ### Key Points: - **Introduction to Linters:** - Linters are static code analysis tools that help identify errors in programming, enforce coding standards, and provide feedback on code quality. - **Importance of Linters at GitHub:** - GitHub's monorepo has over 2.5 million lines of Ruby code and receives contributions from over a thousand engineers each year. Linters help maintain consistency and quality in such a large codebase. - **Types of Linters Utilized:** - **Nudges:** Provides proactive feedback without blocking builds, serving as gentle reminders to adhere to standards. - **Test-based Linters:** These are written as tests that check for specific coding practices, such as using inclusive language, which exemplifies GitHub's focus on diversity in language. - **Abstract Syntax Tree (AST) Linters:** More advanced linters that look at the structure of code instead of just the text, making them more efficient in catching violations and providing instant feedback within the development environment. - **Examples and Use Cases:** - Joel provides examples of nudges used to prevent leaking sensitive information through HTML comments and tests written to enforce inclusive language. - An illustrative case of an AST linter is shown, which helps ensure that code practices don't diverge between production and testing environments. - **Challenges Faced:** - Over-reliance on linters can complicate code merges due to conflicting linter rules; strategies to mitigate this, like tracking violations differently, are discussed. - Potential weaknesses of static analysis in a dynamic language like Ruby underscore the need for continuous evaluation of linter efficacy. ### Conclusions: - Linters provide significant benefits by ensuring consistent coding practices and improving the quality of code reviews. However, they can also create friction within the development process. Joel encourages considering whether every expected feedback could be sufficiently automated through linters. - Ultimately, while automation through linters enhances code quality, the significance of human judgment in the software development process should not be overlooked. The talk invites attendees to question when linters might be unnecessary and promotes a mindful approach to their implementation.
Suggest modifications
Cancel