ocaml/dune

Detect common typos in metadata and attempt to guess user's intention (or at least print a hint)

オープン

#11,561 opened on 2025/03/24

 (12 件のコメント) (0 件のリアクション) (0 人の担当者)OCaml (478 件のフォーク)github user discovery
good first issue

Repository metrics

Stars
 (1,882 個のスター)
PR merge metrics
 (平均マージ 1d 20h) (30d で 345 merged PRs)

説明

In dune-project there are many opportunities for typos that are technically correct but don't express the user's intention. Two examples:

(package
 (name foo)
 (depends
  (bar (= version))   ; should be :version
  (baz :with_test)))) ; should be :with-test

Desired Behavior

If a dune project has obvious typos it would be helpful if dune could detect this and print a warning with a suggestion of what the correct value should be.

Additionally, dune could promote the suggested changes into dune-project, or even assume the correct version and print a warning. In these two cases we should allow the user to override this behaviour just in case it's not a typo and they really want the version of their project to be "version".

コントリビューターガイド