From 247880c10d108726cb91b2695bfb2cccbf7d3882 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Wed, 29 May 2024 13:09:10 +0200 Subject: [PATCH 1/3] :sparkles: Recognize scala-steward as dependency update tool Signed-off-by: Arnout Engelen --- checks/raw/dependency_update_tool.go | 15 +++++++++++++++ checks/raw/dependency_update_tool_test.go | 12 ++++++++++++ 2 files changed, 27 insertions(+) diff --git a/checks/raw/dependency_update_tool.go b/checks/raw/dependency_update_tool.go index a25c73194bc..a644ce8f1c5 100644 --- a/checks/raw/dependency_update_tool.go +++ b/checks/raw/dependency_update_tool.go @@ -127,6 +127,21 @@ 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": + *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 5b5b3f62c9b..730d9cdb95e 100644 --- a/checks/raw/dependency_update_tool_test.go +++ b/checks/raw/dependency_update_tool_test.go @@ -105,6 +105,18 @@ 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: ".lift.toml", path: ".lift.toml", From 27f988040fbd09bdd4ef163d07009ede3809758d Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Thu, 30 May 2024 09:35:25 +0200 Subject: [PATCH 2/3] :sparkles: also recognize scala-steward.conf in subdirectories Signed-off-by: Arnout Engelen --- checks/raw/dependency_update_tool.go | 6 +++++- checks/raw/dependency_update_tool_test.go | 24 +++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/checks/raw/dependency_update_tool.go b/checks/raw/dependency_update_tool.go index a644ce8f1c5..9796babce31 100644 --- a/checks/raw/dependency_update_tool.go +++ b/checks/raw/dependency_update_tool.go @@ -129,7 +129,11 @@ 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": + "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"), diff --git a/checks/raw/dependency_update_tool_test.go b/checks/raw/dependency_update_tool_test.go index 730d9cdb95e..2a3f8812f94 100644 --- a/checks/raw/dependency_update_tool_test.go +++ b/checks/raw/dependency_update_tool_test.go @@ -117,6 +117,30 @@ func Test_checkDependencyFileExists(t *testing.T) { 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", From 571a368f5981824aa88249755c7a7eae449450e9 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Thu, 30 May 2024 09:37:09 +0200 Subject: [PATCH 3/3] :seedling: add scala-steward to README Signed-off-by: Arnout Engelen --- docs/checks/dependencyupdatetool/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/checks/dependencyupdatetool/README.md b/docs/checks/dependencyupdatetool/README.md index 7217ee0ab55..af04ae6c68b 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