Opinionated OCaml linter with Merlin integration for code quality, naming conventions, and style checks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

merlint: complete expected output for E825/E830 cram tests

Both tests previously stopped at the [$ merlint -B -r EXXX bad/]
invocation line with no recorded output, so the test suite would
have promoted any lint output as new. Fill in the analysis report
the lint actually produces (category breakdown, issue table, the
"good" run with no findings) so the diffs catch behavioural
regressions.

+86
+42
test/cram/e825.t/run.t
··· 1 1 Test bad example - CSV traces but no csv lib in dune: 2 2 $ merlint -B -r E825 bad/ 3 + Running merlint analysis... 4 + 5 + Analyzing 0 files 6 + 7 + ✓ Code Quality (0 total issues) 8 + ✓ Code Style (0 total issues) 9 + ✓ Naming Conventions (0 total issues) 10 + ✓ Documentation (0 total issues) 11 + ✓ Project Structure (0 total issues) 12 + ✓ Test Quality (0 total issues) 13 + ✗ Interop Testing (1 total issues) 14 + [E825] Missing csv dependency (1 issue) 15 + Interop tests with CSV traces should use csv for parsing. Add csv to the 16 + (libraries ...) in the dune file and use Csv.decode_file with a Row codec. 17 + - (global) Interop test bad/foo/test/interop/oracle has CSV traces but dune lacks csv dependency 18 + ✓ Code Generation (0 total issues) 19 + 20 + ╭─────────────────┬──────────────────────────────╮ 21 + │ Category │ Issues │ 22 + ├─────────────────┼──────────────────────────────┤ 23 + │ Interop Testing │ 1 (1 missing csv dependency) │ 24 + ╰─────────────────┴──────────────────────────────╯ 25 + 26 + 27 + Summary: ✗ 1 total issue (applied 1 rule) 28 + ✗ Some checks failed. See details above. 29 + [1] 3 30 4 31 Test good example - CSV traces with csv lib in dune: 5 32 $ merlint -B -r E825 good/ 33 + Running merlint analysis... 34 + 35 + Analyzing 0 files 36 + 37 + ✓ Code Quality (0 total issues) 38 + ✓ Code Style (0 total issues) 39 + ✓ Naming Conventions (0 total issues) 40 + ✓ Documentation (0 total issues) 41 + ✓ Project Structure (0 total issues) 42 + ✓ Test Quality (0 total issues) 43 + ✓ Interop Testing (0 total issues) 44 + ✓ Code Generation (0 total issues) 45 + 46 + Summary: ✓ 0 total issues (applied 1 rule) 47 + ✓ All checks passed!
+44
test/cram/e830.t/run.t
··· 1 1 Test bad example - generate.py defines its own encode function: 2 2 $ merlint -B -r E830 bad/ 3 + Running merlint analysis... 4 + 5 + Analyzing 0 files 6 + 7 + ✓ Code Quality (0 total issues) 8 + ✓ Code Style (0 total issues) 9 + ✓ Naming Conventions (0 total issues) 10 + ✓ Documentation (0 total issues) 11 + ✓ Project Structure (0 total issues) 12 + ✓ Test Quality (0 total issues) 13 + ✗ Interop Testing (1 total issues) 14 + [E830] Inlined algorithm in generator (1 issue) 15 + The generator MUST call the upstream tool's public API. Never reimplement the 16 + algorithm being verified — this defeats the purpose of interop testing. If 17 + the public API doesn't expose what you need, drop the test rather than 18 + inlining. 19 + - (global) Interop generator bad/foo/test/interop/oracle/scripts/generate.py: defines encode/decode/compute functions — may be reimplementing the algorithm instead of calling the oracle's API 20 + ✓ Code Generation (0 total issues) 21 + 22 + ╭─────────────────┬──────────────────────────────────────╮ 23 + │ Category │ Issues │ 24 + ├─────────────────┼──────────────────────────────────────┤ 25 + │ Interop Testing │ 1 (1 inlined algorithm in generator) │ 26 + ╰─────────────────┴──────────────────────────────────────╯ 27 + 28 + 29 + Summary: ✗ 1 total issue (applied 1 rule) 30 + ✗ Some checks failed. See details above. 31 + [1] 3 32 4 33 Test good example - generate.py only calls the upstream library: 5 34 $ merlint -B -r E830 good/ 35 + Running merlint analysis... 36 + 37 + Analyzing 0 files 38 + 39 + ✓ Code Quality (0 total issues) 40 + ✓ Code Style (0 total issues) 41 + ✓ Naming Conventions (0 total issues) 42 + ✓ Documentation (0 total issues) 43 + ✓ Project Structure (0 total issues) 44 + ✓ Test Quality (0 total issues) 45 + ✓ Interop Testing (0 total issues) 46 + ✓ Code Generation (0 total issues) 47 + 48 + Summary: ✓ 0 total issues (applied 1 rule) 49 + ✓ All checks passed!