From 2855274aab79d05ca1a26f12671a4644de4ff2ac Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Thu, 30 May 2024 19:57:19 +0200 Subject: [PATCH] :sparkles: Recognize scala-steward as dependency update tool (#4130) * :sparkles: Recognize scala-steward as dependency update tool Signed-off-by: Arnout Engelen * :sparkles: also recognize scala-steward.conf in subdirectories Signed-off-by: Arnout Engelen * :seedling: add scala-steward to README Signed-off-by: Arnout Engelen --------- Signed-off-by: Arnout Engelen --- checks/raw/dependency_update_tool.go | 19 ++++++++++++ checks/raw/dependency_update_tool_test.go | 36 ++++++++++++++++++++++ docs/checks/dependencyupdatetool/README.md | 2 ++ 3 files changed, 57 insertions(+) diff --git a/checks/raw/dependency_update_tool.go b/checks/raw/dependency_update_tool.go index a25c73194bc9..9796babce31d 100644 --- a/checks/raw/dependency_update_tool.go +++ b/checks/raw/dependency_update_tool.go @@ -127,6 +127,25 @@ var checkDependencyFileExists fileparser.DoWhileTrueOnFilename = func(name strin }, }, }) + // https://github.com/scala-steward-org/scala-steward/blob/main/docs/repo-specific-configuration.md + case ".scala-steward.conf", + "scala-steward.conf", + ".github/.scala-steward.conf", + ".github/scala-steward.conf", + ".config/.scala-steward.conf", + ".config/scala-steward.conf": + *ptools = append(*ptools, checker.Tool{ + Name: "scala-steward", + URL: asPointer("https://github.com/scala-steward-org/scala-steward"), + Desc: asPointer("Works with Maven, Mill, sbt, and Scala CLI."), + Files: []checker.File{ + { + Path: name, + Type: finding.FileTypeSource, + Offset: checker.OffsetDefault, + }, + }, + }) } // Continue iterating, even if we have found a tool. diff --git a/checks/raw/dependency_update_tool_test.go b/checks/raw/dependency_update_tool_test.go index 5b5b3f62c9b5..2a3f8812f942 100644 --- a/checks/raw/dependency_update_tool_test.go +++ b/checks/raw/dependency_update_tool_test.go @@ -105,6 +105,42 @@ func Test_checkDependencyFileExists(t *testing.T) { want: true, wantErr: false, }, + { + name: ".scala-steward.conf", + path: ".scala-steward.conf", + want: true, + wantErr: false, + }, + { + name: "scala-steward.conf", + path: "scala-steward.conf", + want: true, + wantErr: false, + }, + { + name: ".github/.scala-steward.conf", + path: ".github/.scala-steward.conf", + want: true, + wantErr: false, + }, + { + name: ".github/scala-steward.conf", + path: ".github/scala-steward.conf", + want: true, + wantErr: false, + }, + { + name: ".config/.scala-steward.conf", + path: ".config/.scala-steward.conf", + want: true, + wantErr: false, + }, + { + name: ".config/scala-steward.conf", + path: ".config/scala-steward.conf", + want: true, + wantErr: false, + }, { name: ".lift.toml", path: ".lift.toml", diff --git a/docs/checks/dependencyupdatetool/README.md b/docs/checks/dependencyupdatetool/README.md index 7217ee0ab551..af04ae6c68b0 100644 --- a/docs/checks/dependencyupdatetool/README.md +++ b/docs/checks/dependencyupdatetool/README.md @@ -5,6 +5,8 @@ * Detection is based on the configuration files listed [here](https://docs.renovatebot.com/configuration-options/) * [PyUp](https://github.com/pyupio/pyup) * Detection based on a `.pyup.yml` file +* [scala-steward](https://github.com/scala-steward-org/scala-steward) + * Detection is based on the configuration files listed [here](https://github.com/scala-steward-org/scala-steward/blob/main/docs/repo-specific-configuration.md) # Add Support