PiLintLint your code to the digits of Pi. PiLint is a VS Code extension that enforces a simple, brutal rule: each line of your code must have exactly as many characters as the corresponding digit of Pi.
Is it useful? Absolutely not. Is it mathematically poetic? Without question. The Chaos ExplainedPi = 3.14159265358979323846... That means line 2 must be 1 character long. Line 6 must be exactly 9 characters. Line 10 must be 3 characters. Your beautifully formatted, carefully indented code will be flagged on almost every single line. That is the point. The digits of Pi are infinite and non-repeating, which means no two lines share the same rule, and the pattern never settles into anything predictable. Your codebase will be judged against a transcendental number and found wanting. Welcome. FeaturesDiagnosticsEvery line that doesn't match its Pi digit gets flagged showing the required length, the Pi sequence position, and the current length. Hover over any line to see the full breakdown. Pi Sequence AnchorThe single most important feature for maintaining your sanity. Right-click any line and select "PiLint: Start Pi Sequence Here" to set that line as the start of the Pi sequence. All lines above it are completely ignored — perfect for skipping imports, license headers, or any boilerplate you'd rather not fight with. The anchor line gets a blue left border and a "PiLint: Reset Pi Sequence to Line 1" removes the anchor and returns to full-file mode. Pi ScoreA lightbulb icon in the status bar shows your workspace's Pi compliance percentage — how many lines actually match their Pi digit. It glows brighter as your score climbs, from dim at low percentages to bright gold at 80%+. It flashes when the score changes. Click the lightbulb to open the score menu:
Leaderboard SidebarA dedicated sidebar panel ranks all workspace files by their Pi score with color-coded tiers:
Click any file to open it. Quick FixesHover over a flagged line to see what it needs. Click "Pad to Pi digit X" to add trailing spaces. Run "PiLint: Format Document to Pi Digits" from the command palette to attempt all lines at once. Hard ModeEnable Pi Mode to block saving files below a configurable score threshold. A warning appears when you try to save a non-compliant file. You can save anyway or go back and suffer more. AchievementsToast notifications celebrate milestones when a file reaches 25%, 50%, 75%, and 100% Pi compliance. Hitting 100% on a real codebase is a feat that will likely require a full rewrite. Streak CounterTracks consecutive saves that improve a file's Pi score. Your streak is shown in the status bar tooltip. Ignore PatternsConfigure which lines are excluded from scoring:
Visual DecorationsDots appear at the end of each non-compliant line showing exactly how many characters are needed to reach the required Pi digit. Commands
Settings
Strategy Tips
Why?Because FibLint wasn't hard enough. Pi is a transcendental, irrational number — it goes on forever without repeating. Mapping your code to its digits means every line has a unique, arbitrary, mathematically justified target. The universe is telling you how long your lines should be. Who are you to argue? Also by the same developer as FibLint — the slightly more forgiving Fibonacci line length linter. Install both. Suffer in harmony. LicenseMIT |