rust-lang / rust-lang/rust-clippy

[Feature] Generate and publish JSON Schema for Clippy Config

Open
#13,868 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-feature-request
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

It would be really nice to create and publish a JSON schema for the Clippy configuration file. By having a schema definition, a number of editors will automatically provide a much nicer developer experience by validating the configuration and providing little perks like auto-completion.

There are already a few Rust-related schemas published on the JSON Schema Store:

and for other examples of TOML files being published:

  • pyproject: for Python projects
  • ruff: a Python linter/formatter written in Rust
  • uv: a Python package and version manager written in Rust

I think it might be possible to look at how ruff and uv have implemented this and adapt it to Clippy.

If that's something you want to go ahead with, I might be able to have a look into creating a PR.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining how Clippy's configuration is defined and how Ruff and uv implement their schemas. No repository files or tests are named; done means a schema for the Clippy configuration is generated and published to JSON Schema Store so editors can validate it and provide completion.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.