{"id":31762246,"url":"https://github.com/mbarbin/example-dunolint-autoload","last_synced_at":"2026-05-19T14:04:50.576Z","repository":{"id":318218640,"uuid":"1070387829","full_name":"mbarbin/example-dunolint-autoload","owner":"mbarbin","description":"Example repository demonstrating dunolint's automatic config discovery and hierarchical configuration loading","archived":false,"fork":false,"pushed_at":"2025-10-05T20:27:46.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-05T22:17:45.904Z","etag":null,"topics":["dune","dunolint","example","linter","ocaml"],"latest_commit_sha":null,"homepage":"https://mbarbin.github.io/dunolint/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbarbin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-05T20:24:52.000Z","updated_at":"2025-10-05T20:28:59.000Z","dependencies_parsed_at":"2025-10-05T22:28:02.078Z","dependency_job_id":null,"html_url":"https://github.com/mbarbin/example-dunolint-autoload","commit_stats":null,"previous_names":["mbarbin/example-dunolint-autoload"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/mbarbin/example-dunolint-autoload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbarbin%2Fexample-dunolint-autoload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbarbin%2Fexample-dunolint-autoload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbarbin%2Fexample-dunolint-autoload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbarbin%2Fexample-dunolint-autoload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbarbin","download_url":"https://codeload.github.com/mbarbin/example-dunolint-autoload/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbarbin%2Fexample-dunolint-autoload/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002122,"owners_count":26083307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dune","dunolint","example","linter","ocaml"],"created_at":"2025-10-09T22:17:19.948Z","updated_at":"2025-10-09T22:17:21.798Z","avatar_url":"https://github.com/mbarbin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dunolint Autoload Config Test Repository\n\n\u003e **⚠️ Example Repository**\n\u003e This is a demonstration/example repository showing how dunolint's config autoloading feature works.\n\u003e **Not an official dunolint repository.** Created for educational and testing purposes.\n\nThis repository tests the dunolint autoloading config feature, which allows dunolint to automatically discover and apply configuration files from different levels of the project hierarchy.\n\n## Repository Structure\n\n```\n.\n├── dune-project                 # Root project (lang dune 3.18)\n├── dunolint                     # Root config: base rules\n├── lib/\n│   ├── dune                     # Library with violations\n│   └── root_lib.ml\n├── repo/\n│   ├── foo/\n│   │   ├── dune-project         # Foo subproject\n│   │   ├── dunolint             # Foo config: overrides + additions\n│   │   └── lib/\n│   │       ├── dune             # Library with violations\n│   │       └── wrong_name.ml\n│   └── bar/\n│       ├── dune-project         # Bar subproject\n│       ├── dunolint             # Bar config: different overrides\n│       └── lib/\n│           ├── dune             # Library with minimal violations\n│           └── bar_lib.ml\n├── test.sh                      # Test script with multiple scenarios\n├── dune                         # Test runner with promotion\n└── test.expected                # Expected output (promoted)\n```\n\n## Config Strategy\n\n### Root `dunolint` Config\n- **Combinable rules:**\n  - Enforce `(instrumentation (backend bisect_ppx))` on all libraries\n\n- **Base rules (can be overridden):**\n  - `(implicit_transitive_deps (equals false))`\n  - `(name (is_suffix _lib))`\n\n### Foo `dunolint` Config\n- **Overrides:**\n  - Specific name requirement: `(name (equals foo_lib))` - overrides root's `is_suffix _lib` rule\n\n### Bar `dunolint` Config\n- **Overrides:**\n  - Allow implicit transitive deps: `(implicit_transitive_deps (equals true))` - overrides root's requirement for `false`\n  - Specific name: `(name (equals bar_lib))` - overrides root's `is_suffix _lib` rule\n\n## Intentional Violations\n\n### Root `dune-project`\n- ❌ `implicit_transitive_deps true` (violates root rule requiring false)\n\n### `lib/dune` (Root Library)\n- ❌ Missing `instrumentation` field (violates root combinable rule)\n- ✅ `name root_lib` (matches `is_suffix _lib`)\n\n### `repo/foo/dune-project`\n- ❌ `implicit_transitive_deps true` (violates inherited root rule requiring false)\n\n### `repo/foo/lib/dune` (Foo Library)\n- ❌ `name wrong_name` (violates foo override requiring `foo_lib`)\n- ❌ Missing `instrumentation` field (violates inherited root rule)\n\n### `repo/bar/dune-project`\n- ❌ `implicit_transitive_deps false` (violates bar override requiring true)\n\n### `repo/bar/lib/dune` (Bar Library)\n- ❌ Missing `instrumentation` field (violates inherited root rule)\n- ✅ `name bar_lib` (matches bar override)\n\n## Test Scenarios\n\nThe `test.sh` script runs 6 different test scenarios:\n\n1. **From root directory**: Should apply root config to entire tree\n2. **`--below lib`**: Check only root lib with root config\n3. **`--below repo/foo`**: Check foo with foo config loaded\n4. **`--below repo/bar`**: Check bar with bar config loaded\n5. **From `repo/foo` as root**: Foo config as root\n6. **From `repo/bar` as root**: Bar config as root\n\n## Running Tests\n\n### Manual Test Run\n```bash\n./test.sh\n```\n\n### Dune Test with Promotion\n```bash\n# Run tests and see diff\ndune runtest\n\n# Promote new output as expected\ndune runtest --auto-promote\n```\n\n### Initial Setup\nTo generate the initial expected output:\n```bash\ndune runtest --auto-promote\n```\n\n## Expected Behavior\n\nThe test verifies that:\n- Root config rules are applied to all libraries by default\n- Subproject configs can override specific rules\n- Subproject configs can add new rules that combine with inherited ones\n- The `--below` flag correctly limits the scope\n- Running from different directories correctly identifies the root config\n\n## Usage for Validating New Dunolint Versions\n\nAfter updating dunolint:\n1. Run `dune runtest` in this repository\n2. Review the diff to ensure behavior is as expected\n3. If behavior changed intentionally, promote with `dune runtest --auto-promote`\n4. Commit the updated `test.expected` to track the new baseline\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbarbin%2Fexample-dunolint-autoload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbarbin%2Fexample-dunolint-autoload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbarbin%2Fexample-dunolint-autoload/lists"}