Extensible code linter

Gojko Adžić on the Modern Software Engineering channel makes a good point that markdown prayers doesn’t help when your enthusiastic intern (LLM) shows up at work drunk. You need stricter guardrails.

And I rapidly developed an interest in this topic when I caught Gemini sneaking in a uninitialized var (why? I have no idea).

In JavaScript/PHP/others it’s just a matter of asking the LLM to write a rule for the linter you’re already using, and add that to the project.

But that’s a bit more complicated in Crystal land, ameba is nice, but not particularly extensible, it seems. Of course my particular issue can be caught with rg, but it would be nice if things was a bit more integrated.

Thoughts? Any tools I’ve not yet discovered?

IIRC ameba had this in its bin/:

#!/usr/bin/env crystal

# Require ameba extensions here which are added as project dependencies.
# Example:
#
# require "ameba-performance"

# Require ameba cli which starts the inspection.
require "ameba/cli"

But does mean you’d have to have a local binary to require extensions into/use for your project. Versus like just picking up extensions dynamically when you run it. But that may be your best bet in the meantime.

Oh, nice, something to work with. Thanks.

A good example of extending Ameba in action can be seen here: GitHub - toddsundsted/ktistec: ActivityPub (https://www.w3.org/TR/activitypub/) server for individual users and small groups. · GitHub

Oh, most excellent, I must study.