{"id":23613666,"url":"https://github.com/freckle/stack-lint-extra-deps","last_synced_at":"2025-05-12T21:41:11.549Z","repository":{"id":40261914,"uuid":"435200081","full_name":"freckle/stack-lint-extra-deps","owner":"freckle","description":"Stack Lint Extra Deps (SLED)","archived":false,"fork":false,"pushed_at":"2025-04-21T00:33:26.000Z","size":859,"stargazers_count":12,"open_issues_count":6,"forks_count":3,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-04-21T01:38:43.389Z","etag":null,"topics":["ghvm-managed"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/freckle.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-12-05T15:08:35.000Z","updated_at":"2025-04-09T17:04:27.000Z","dependencies_parsed_at":"2024-01-30T20:35:57.806Z","dependency_job_id":"2d1132ae-7d99-4837-8704-861697d8180b","html_url":"https://github.com/freckle/stack-lint-extra-deps","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freckle%2Fstack-lint-extra-deps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freckle%2Fstack-lint-extra-deps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freckle%2Fstack-lint-extra-deps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freckle%2Fstack-lint-extra-deps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/freckle","download_url":"https://codeload.github.com/freckle/stack-lint-extra-deps/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253826991,"owners_count":21970450,"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","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":["ghvm-managed"],"created_at":"2024-12-27T17:18:39.357Z","updated_at":"2025-05-12T21:41:11.521Z","avatar_url":"https://github.com/freckle.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lint `extra-deps`\n\nMaintaining `extra-deps` in a `stack.yaml` (or `packages` in a `snapshot.yaml`)\nis a pain. If an extra dep has been moved into your resolver, you should remove\nit. If your extra dep has a new version on Hackage, you may want to update it.\nIf you have a `git` dependency, you may want to know if that change is now\navailable in a versioned release on Hackage.\n\nAll of these are manual, annoying, and error prone to check by hand.\n\n![](./files/example.png)\n\n## Install\n\nGet the Download URL for the latest release,\n\n```sh\nurl=$(curl --silent https://api.github.com/repos/freckle/stack-lint-extra-deps/releases/latest |\n  jq '.assets[].browser_download_url | select(.|test(\"x86_64-linux.tar.gz$\"))' --raw-output)\n```\n\n(You can also just browse [Releases][].)\n\n[releases]: https://github.com/freckle/stack-lint-extra-deps/releases\n\n```console\n% curl -L \"$url\" | tar xzf - \u0026\u0026\n  mv stack-lint-extra-deps/stack-lint-extra-deps ~/.local/bin \u0026\u0026\n  rmdir stack-lint-extra-deps\n% which stack-lint-extra-deps\n~/.local/bin/stack-lint-extra-deps\n```\n\n## Usage\n\n```console\n% stack lint-extra-deps --help\nUsage: stack-lint-extra-deps [-p|--path PATH] [-r|--resolver RESOLVER]\n                             [-f|--format tty|gha|json] [--exclude PATTERN]\n                             [-R|--no-check-resolver] [--checks CHECKS]\n                             [-n|--no-exit] [-F|--fix] [PATTERN] [--version]\n\n  stack lint-extra-deps (sled)\n\nAvailable options:\n  -p,--path PATH           Path to config to lint\n  -r,--resolver RESOLVER   Resolver to use, default is read from --path\n  -f,--format tty|gha|json Format to output in\n  --exclude PATTERN        Exclude deps matching PATTERN\n  -R,--no-check-resolver   Don't check for out of date resolver\n  --checks CHECKS          Checks to run, one of: none, all, git, hackage\n  -n,--no-exit             Exit successfully, even if suggestions found\n  -F,--fix                 Automatically fix problems\n  PATTERN                  Limit to deps matching PATTERN\n  --version                Print version number information and quit\n  -h,--help                Show this help text\n```\n\nOur output uses [Blammo][] and so [any of the `LOG_` environment\nvariables][blammo-config] it supports may be used to control it, such as\n`LOG_COLOR`.\n\n[blammo]: https:/github.com/freckle/blammo#readme\n[blammo-config]: https://github.com/freckle/blammo#configuration\n\n## Pragmas\n\nComments prefixed by `@sled ` (e.g. \"pragmas\") can be added to the linted file\nand will be parsed as command-line options to change the program's behavior when\nlinting that file. This is most useful for centralizing and documenting\n`--exclude` directives:\n\n```yaml\nresolver: lts-20\nextra-deps:\n  - one-dep-1.0\n\n  # We need to hold this back because...\n  # @sled --exclude another-dep\n  - another-dep-2.0\n```\n\nThese comments can appear anywhere. All options besides `--path` will be\nrespected. Failure to parse a directive will result in a warning logged to\n`stderr`, but otherwise be ignored.\n\n## Checking Resolver\n\nBefore checking `extra-deps`, SLED will check that your `resolver` is the latest\nin its series. If not, it will emit a \"replace with\" suggestion and use the new\nresolver when checking the `extra-deps`.\n\nThis behavior is not part of the `--checks` option, which refers to `extra-deps`\nchecks only. It can be disabled with `--no-check-resolver`, or you can run\n_only_ this check by using `--checks none`.\n\n## GitHub Action\n\nThis repository is also a GitHub Action that installs and runs the tool with no\narguments (so with all defaults according to above). The `version` and\n`arguments` can be adjusted through inputs:\n\n```yaml\nsteps:\n  - uses: actions/checkout@v4\n  - uses: freckle/stack-lint-extra-deps@v1\n    with:\n      version: 1.0.1.6\n      arguments: \u003e-\n        --path stack-x.yaml\n        --exclude 'amazonka-*'\n        --checks hackage\n        --no-exit\n```\n\n### Action Version\n\nVersion branches (e.g. `@v1`) are unrelated to the tool's version itself (and\ncorresponding tags). They are maintained based on changes made only to the\naction itself.\n\n### Annotations\n\nSince `v1.2` (of the executable, not the action), `--format gha` is available\nand will result in output that produces annotations in your workflow summary.\n\n![](./files/annotations.png)\n\nIn the future, this may become part of the default `arguments`, but for now you\nare expected to add it yourself if desired.\n\n## Features\n\n- [x] Suggest update when there is a newer version of a Hackage dep available\n- [x] Suggest removal when a Hackage dep is in the resolver at a same-or-newer\n      version\n- [x] Suggest update when there are newer commits in a git dep\n- [x] Suggest replacement when there is a Hackage version of a git dep at a\n      same-or-newer version\n- [ ] Apply custom rules\n- [x] Suggest when newer resolver is available\n- [x] Auto-fix\n\n## Release\n\nTo trigger a new release, push a [conventional commit] to `main`:\n\n- `fix:` to trigger a patch release\n- `feat:` to trigger a minor release\n- Use `\u003ctype\u003e!:` or include a `BREAKING CHANGE: \u003cchange\u003e` footer to trigger\n  major\n\n[conventional commit]: https://www.conventionalcommits.org/en/v1.0.0/#summary\n\n---\n\n[LICENSE](./LICENSE) | [CHANGELOG](./CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreckle%2Fstack-lint-extra-deps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreckle%2Fstack-lint-extra-deps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreckle%2Fstack-lint-extra-deps/lists"}