Skip to content

semcheck

Go linter whose rules are plain-English questions: static analysis picks nodes, Jev answers a Noul about each one.

CLIbetaMIT

Overview

semcheck is a linter for Go in which static analysis decides where to look and a decision model decides whether the code is right. Rules in .semcheck.yml pair deterministic matchers on the syntax tree (for example calls to log.Print* or functions prefixed Get, Is or Has) with a plain-English question and a min_confidence. The type checker adds notes the text does not say, such as that a variable is a User with an Email field, and the model reads the node with those notes and answers one question.

Two rules ship: no-pii-in-logs ('Does this log call write personal data?') and name-matches-behavior ('Does this function modify state although its name suggests it only reads?'). The README reports that on three open-source projects the sampled findings of these two rules were all correct (12 of 12 per the list), while other candidate rules did not ship because right and wrong findings had the same probabilities. It runs standalone, as a go vet tool or a golangci-lint plugin, honours nolint comments, and caches answers by hash so only changed code is re-asked. Jev is the default provider, and others can be added by implementing a Judge.

What the decision model decides

TypeQuestionAnswers
Yes / noDoes this log call write personal data (names, emails, phone numbers, postal addresses, government IDs)?—
Yes / noDoes this function modify state although its name suggests it only reads?—

How it works

  1. Matchers select exact syntax nodes per rule
  2. Type checker adds notes about types and fields
  3. Jev answers the rule's question as a Noul
  4. Report findings above min_confidence; cache answers by hash

Strengths

  • Catches issues no name-based rule could
  • Only changed code is re-asked
  • Integrates with go vet and golangci-lint
  • Candidly reports which rules did not work

Caveats

  • Precision figures are from small samples
  • Thresholds are specific to the model used

Getting started

go install github.com/arturobermejo/semcheck/cmd/semcheck@latest, set TYPESAFE_API_KEY, and add a .semcheck.yml.

At a glance

Type
CLI
Status
beta
Language
Go
Runtime
CLI / go vet tool / golangci-lint plugin
Has code
yes
Has tests
yes
License
MIT

Use cases and integrations

How curated lists describe it

  • Code review: Go linter whose rules are plain-English questions such as "does this log call write personal data?", asking Jev one `Noul` for each piece of code a rule applies to and reporting it above the rule's threshold; its two shipped rules were right on 12 of 12 sampled findings in three open-source projects.

    yibie/awesome-jev

Frequently asked questions

What does Jev decide in semcheck?

Whether each matched piece of code violates the rule's plain-English question.

How accurate is it?

The README reports all sampled findings of the two shipped rules were right on three open-source projects.

Do reruns cost money?

Only for changed code; answers are cached by question, code and type notes.

Related projects

  • Rust code-review gate asking Jev small typed questions about functions and tests, failing CI only on rules measured 80% right.

    CLIproductionRust
  • Coding-agent hook that asks Jev one yes/no per project rule on every edit or turn and makes the agent fix any violation.

    HookbetaTypeScript
  • Advisor for coding agents: git and Stop hooks flag test tampering, secrets and skipped hooks, with optional Jev review findings.

    Hookbeta
  • Read-only Go CLI that checks files against your plain-language code rules with Jev, locally or in CI.

    CLIbetaGo
  • CLI and agent commands auditing a git diff against YAML standards packs, scoring each hunk with Jev so agents fix only flags.

    Agent skillbetaTypeScript
  • Fuzzy linter hook for Claude Code and Codex where Jev checks each written file against team rules and reports violations at edit time.

    HookbetaTypeScript