-
-
Notifications
You must be signed in to change notification settings - Fork 909
Closed
Description
search you tried in the issue tracker
describe your actual problem
Description
Currently, coursier's additional_dependencies only supports the default channel.
This means it can't pull dependencies from repositories like central.
AS-IS
repos:
- repo: https://github.com/junghoon-vans/pre-coursier
rev: v0.2.0
hooks:
- id: scalafmt
args: ["--config-str", "version = 2.4.2, runner.dialect = scala3"]
additional_dependencies: ["scalafmt:2.4.2"] # This is available
- id: checkstyle
args: [".", "-c", "./checkstyle.xml"]
additional_dependencies: ["checkstyle:10.8.0"] # This is not avaliableSolution
How about changing central to the default repository for more dependencies?
In fact, coursier's default repository also fetches files from central.
TO-BE
repos:
- repo: https://github.com/junghoon-vans/pre-coursier
rev: v0.2.0
hooks:
- id: scalafmt
args: ["--config-str", "version = 2.4.2, runner.dialect = scala3"]
additional_dependencies: ["org.scalameta::scalafmt-cli:2.4.2"]
- id: checkstyle
args: [".", "-c", "./checkstyle.xml"]
additional_dependencies: ["com.puppycrawl.tools:checkstyle:10.8.0"]But the library must be explicitly marked in additional_dependencies.
pre-commit --version
pre-commit:3.4.0
Metadata
Metadata
Assignees
Labels
No labels