FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Why I built codesize: enforcing function length limits with an AST
How-ToTools

Why I built codesize: enforcing function length limits with an AST

via Dev.toChristian C. Berclaz2w ago

Every team I have worked on had some version of the rule: "keep functions short." It shows up in style guides, code review comments, and onboarding docs. It almost never shows up in CI. When it does get automated, the tooling usually reaches for wc -l on the whole file. That is a rough proxy at best. A 300-line file might contain five short, readable functions and a big block of comments. A 150-line file might contain one function that does the work of three. File length and function length are different problems. In the advent of AI, these constraints can be even more difficult to enforce. I built codesize to check the thing that actually matters: how long each function is. Why existing tools fall short cloc and similar tools count lines of code, but at the file level. Linters can flag long functions, but they are language-specific — you need a different one for every language in a polyglot repo, each with its own config format and output schema. What I wanted was a single binary that

Continue reading on Dev.to

Opens in a new tab

Read Full Article
8 views

Related Articles

Building an MCP Server for Your Own Tools
How-To

Building an MCP Server for Your Own Tools

Medium Programming • 6d ago

[MM’s] Boot Notes — The Day Zero Blueprint — Test Smarter on Day One
How-To

[MM’s] Boot Notes — The Day Zero Blueprint — Test Smarter on Day One

Medium Programming • 6d ago

RHAPSODY OF REALITIES - 26TH MARCH 2026
"In Nehemiah’s day, as the people built the wall of…
How-To

RHAPSODY OF REALITIES - 26TH MARCH 2026 "In Nehemiah’s day, as the people built the wall of…

Medium Programming • 6d ago

How to Actually Make Money with a "Free" App
How-To

How to Actually Make Money with a "Free" App

Medium Programming • 1w ago

How-To

Building a Runtime with QuickJS

Lobsters • 1w ago

Discover More Articles