Haskell: shelltestrunner, treefmt --ci (fourmolu/hlint/actionlint), nix-built wrapper commands (postgrest-*)

未关闭
#266 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
github-actions, haskell, python
领域
ci-cd, tooling

调研方向

Start with project_validator/ecosystems/nix.py around line 83, the only place the payload shows treefmt, then grep project_validator/ for pytest, sphinx-build and shelltest to find where recognised test and lint commands are listed. The nix wrapper case needs a design decision about how to treat opaque nix-provided commands, so agree on that before coding. Done means the corpus results for PostgREST and hledger change as expected.

由索引模型根据 Issue 内容生成。

描述

hledger's 585 functional tests are shelltest files (*.test, unrecognised) run by every workflow; PostgREST runs fourmolu, hlint and actionlint through treefmt --ci (treefmt-nix config), and its spec/hasql/io tests, pytest, sphinx-build -b linkcheck and weeder through nix-built postgrest-* wrappers from a composite action's tools: input → code-formatting, static-analysis, ci-lint, tests-run and link-check all wrong. treefmt is a common multiplexer in Nix-managed repos (treefmt.toml / treefmt-nix).

Evidence from the corpus audit

PostgREST/postgrest / code-formatting, static-analysis, ci-lint (treefmt)
  • kind: UNSUPPORTED
  • actual: code-formatting FAIL Haskell: fourmolu.yaml is defined but CI does not run ormolu, fourmolu or stylish-haskell; static-analysis FAIL Haskell: no static analyzer runs; ci-lint WARN CI does not lint its GitHub Actions configuration
  • expected: all three are run by treefmt --ci (fails on unformatted files) with the treefmt-nix configuration enabling fourmolu, hlint and actionlint. treefmt (treefmt.toml / treefmt-nix) is a common multiplexer in Nix-managed repos; the validator knows the word only as a Nix formatter.
  • evidence: .github/workflows/check.yaml:33-34: - name: Run treefmt / run: treefmt --ci; nix/treefmt.nix:26: programs.actionlint.enable = true;; :29-30: programs.fourmolu.enable = true; / programs.hlint.enable = true;; .github/actionlint.yml (actionlint config present); project_validator/ecosystems/nix.py:83: must take it: nixfmt, alejandra and treefmt do). (only mention)
  • repro: treefmt.toml with [formatter.fourmolu] command = "fourmolu" options = ["--mode","check"] and a step run: treefmt --ci
  • confidence: high
PostgREST/postgrest / tests-run, link-check, static-analysis (nix wrapper commands)
  • kind: UNSUPPORTED
  • actual: tests-run FAIL Haskell: tests found in 1 file(s), but no CI configuration runs cabal test (or stack test); Documentation site: ... no CI runs sphinx-build; Python: tests found in 14 file(s), but no CI configuration runs pytest; link-check WARN no link check found in CI configuration; static-analysis Haskell: no static analyzer runs
  • expected: these all run, through nix-built postgrest-* wrapper scripts provided by the ./.github/actions/setup-nix composite action's tools: input: spec/hasql/io tests, pytest, sphinx-build -b linkcheck (scheduled workflow named Linkcheck), weeder. The commands are opaque to the validator (their bodies are in nix/tools/*.nix), so this is a gap rather than a parser bug; a "nix-provided command" notion (or reading checkedShellScript bodies in nix/tools) would be needed.
  • evidence: .github/workflows/test.yaml:103-116: run: postgrest-with-${{ matrix.pgVersion }} postgrest-test-spec ... run: postgrest-with-${{ matrix.pgVersion }} postgrest-test-io -vv; nix/tools/tests.nix:116: ${ioTestPython}/bin/pytest --ignore=test/io/test_big_schema.py --ignore=test/io/test_replica.py -v test/io; .github/workflows/linkcheck.yaml:3-5,25: schedule: / - cron: '1 2 * * 3' ... run: postgrest-docs-linkcheck; nix/tools/docs.nix:175: ${python}/bin/sphinx-build --color -b linkcheck . ../.docs-build; nix/tools/tests.nix:168: docs = "Run spec and io tests while collecting hpc coverage data. First runs weeder to detect dead code.";
  • repro: unclear (needs reading nix shell-script derivations)
  • confidence: medium
simonmichael/hledger / tests-run (shelltestrunner)
  • kind: UNSUPPORTED
  • actual: Haskell tests-run PASS via stack install --test, but the 585 functional tests are invisible: .map.json unrecognised_suffixes: {"suffix": ".test", "files": 585}
  • expected: shelltestrunner (shelltest) is the standard functional-test runner for Haskell CLIs (hledger, pandoc-adjacent tools); recognising shelltest <dir> and *.test files would make the Haskell test picture complete.
  • evidence: .github/workflows/ci.yml:351: COLUMNS=80 $stack exec -- shelltest --execdir -j16 hledger/test -x /_ -x ledger-compat/ledger-baseline -x ledger-compat/ledger-regress -x ledger-compat/ledger-collected; hledger/test/cli/addons.test; grep -rn -i shelltest project_validator/ → no match
  • repro: n/a (gap)
  • confidence: medium

Found by the regression-corpus audit (235 real repositories, one or more per ecosystem profile; corpus and expected results in corpus/). Evidence is quoted from the audited checkouts at the commits pinned in corpus/projects.toml; <checkouts>/<owner>__<repo> is such a checkout.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ByTXNqDWdM7HzezrFtEvQt

主要语言
Python
星标
4
派生
1
平均合并
10 小时 41 分钟
30 天内合并 PR
79

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

cpp-best-practices/project_validator 的其他 Issue

查看 cpp-best-practices/project_validator 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。