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.

fix(merlint): clean up cram test formatting and merge Fmt.pr calls

Remove excessive blank lines from E606 and E607 cram tests for readability.
Merge two consecutive Fmt.pr calls into one in main.ml.

+27 -26
+1 -2
bin/main.ml
··· 224 224 | Error _ -> [] (* Should not happen *)) 225 225 in 226 226 227 - Fmt.pr "Running merlint analysis...@.@."; 228 - Fmt.pr "Analyzing %d files@.@." files_count; 227 + Fmt.pr "Running merlint analysis...@.@.Analyzing %d files@.@." files_count; 229 228 230 229 (* Group issues by category for reporting *) 231 230 let issues_by_category = group_issues_by_category all_issues in
+16 -15
test/cram/e606.t/run.t
··· 3 3 Good tests in correct test stanza: 4 4 $ merlint -B -r E606 good/ 2>&1 | grep -A10 "merlint analysis" | head -10 5 5 Running merlint analysis... 6 - 6 + 7 7 Analyzing 2 files 8 - 8 + 9 9 ✓ Code Quality (0 total issues) 10 10 ✓ Code Style (0 total issues) 11 11 ✓ Naming Conventions (0 total issues) ··· 16 16 Bad test files in wrong test stanza: 17 17 $ merlint -B -r E606 bad/ 18 18 Running merlint analysis... 19 - 19 + 20 20 Analyzing 4 files 21 - 21 + 22 22 ✓ Code Quality (0 total issues) 23 23 ✓ Code Style (0 total issues) 24 24 ✓ Naming Conventions (0 total issues) ··· 30 30 directory. Organize test files so that each test directory contains tests for 31 31 only one library to maintain clear test organization. 32 32 - bad/test_utils.ml:1:0: Test file 'test_utils.ml' tests library 'utils_lib' which is not explicitly declared in the test's dune file 33 - 33 + 34 34 ╭──────────────┬────────────────────────────────────╮ 35 35 │ Category │ Issues │ 36 36 ├──────────────┼────────────────────────────────────┤ 37 37 │ Test Quality │ 1 (1 test file in wrong directory) │ 38 38 ╰──────────────┴────────────────────────────────────╯ 39 - 40 - 39 + 40 + 41 41 Summary: ✗ 1 total issue (applied 1 rule) 42 42 ✗ Some checks failed. See details above. 43 43 [1] ··· 45 45 Test files with declared libraries (should pass): 46 46 $ merlint -B -r E606 bad2/ 47 47 Running merlint analysis... 48 - 48 + 49 49 Analyzing 5 files 50 - 50 + 51 51 ✓ Code Quality (0 total issues) 52 52 ✓ Code Style (0 total issues) 53 53 ✓ Naming Conventions (0 total issues) 54 54 ✓ Documentation (0 total issues) 55 55 ✓ Project Structure (0 total issues) 56 56 ✓ Test Quality (0 total issues) 57 - 57 + 58 58 Summary: ✓ 0 total issues (applied 1 rule) 59 59 ✓ All checks passed! 60 60 61 61 Test files with incomplete library declarations: 62 62 $ merlint -B -r E606 bad3/ 63 63 Running merlint analysis... 64 - 64 + 65 65 Analyzing 5 files 66 - 66 + 67 67 ✓ Code Quality (0 total issues) 68 68 ✓ Code Style (0 total issues) 69 69 ✓ Naming Conventions (0 total issues) ··· 75 75 directory. Organize test files so that each test directory contains tests for 76 76 only one library to maintain clear test organization. 77 77 - bad3/test/test_feed.ml:1:0: Test file 'test_feed.ml' tests library 'views_lib' which is not explicitly declared in the test's dune file 78 - 78 + 79 79 ╭──────────────┬────────────────────────────────────╮ 80 80 │ Category │ Issues │ 81 81 ├──────────────┼────────────────────────────────────┤ 82 82 │ Test Quality │ 1 (1 test file in wrong directory) │ 83 83 ╰──────────────┴────────────────────────────────────╯ 84 - 85 - 84 + 85 + 86 86 Summary: ✗ 1 total issue (applied 1 rule) 87 87 ✗ Some checks failed. See details above. 88 88 [1] 89 +
+10 -9
test/cram/e607.t/run.t
··· 3 3 Test stanza with no deps mixing test files from multiple libraries: 4 4 $ merlint -B -r E607 bad/ 5 5 Running merlint analysis... 6 - 6 + 7 7 Analyzing 5 files 8 - 8 + 9 9 ✓ Code Quality (0 total issues) 10 10 ✓ Code Style (0 total issues) 11 11 ✓ Naming Conventions (0 total issues) ··· 17 17 files for multiple different libraries. Split tests into separate test 18 18 stanzas, one per library. 19 19 - bad/test/test_feed.ml:1:0: Test file 'test_feed.ml' tests library 'views_lib' but test stanza has no declared dependencies and mixes multiple libraries 20 - 21 - ╭──────────────┬──────────────────────────────────────────────────────╮ 22 - │ Category │ Issues │ 23 - ├──────────────┼──────────────────────────────────────────────────────┤ 20 + 21 + ╭──────────────┬────────────────────────────────────────────╮ 22 + │ Category │ Issues │ 23 + ├──────────────┼────────────────────────────────────────────┤ 24 24 │ Test Quality │ 1 (1 test stanza mixes multiple libraries) │ 25 - ╰──────────────┴──────────────────────────────────────────────────────╯ 26 - 27 - 25 + ╰──────────────┴────────────────────────────────────────────╯ 26 + 27 + 28 28 Summary: ✗ 1 total issue (applied 1 rule) 29 29 ✗ Some checks failed. See details above. 30 30 [1] 31 +