-
Notifications
You must be signed in to change notification settings - Fork 509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Verify the example .scala-steward.conf
#3571
Conversation
884ccc0
to
5c683f6
Compare
This checks that the example `.scala-steward.conf` in the docs is equivalent to the JSON one gets when parsing, decoding and encoding that example. With this change, the `docs/mdoc` task fails currently with: ```diff error: repo-specific-configuration.md:211:1: Diff between parsed input (-) and encoded object (+): "groupId" : "com.example", - "version" : "2." + "version" : { + "prefix" : "2." + } }, "pullRequests" : { - "frequency" : "30 day" + "frequency" : "30 days" } "pullRequests" : { - "frequency" : "14 day" + "frequency" : "14 days" } "signoffCommits" : true, - "updatePullRequests" : "always | on-conflicts | never", + "updatePullRequests" : "on-conflicts", "updates" : { "groupId" : "org.acme", - "version" : "1.0" + "version" : { + "prefix" : "1.0" + } } "groupId" : "com.example", - "version" : "1.1." + "version" : { + "prefix" : "1.1." + } } ``` In subsequent commits I'll will fix these reported differences. Closes: #1341
5c683f6
to
e2a67c2
Compare
a99bde2 reduces the diff to: error: repo-specific-configuration.md:211:1: Diff between parsed input (-) and encoded object (+):
"groupId" : "com.example",
- "version" : "2."
+ "version" : {
+ "prefix" : "2."
+ }
},
"signoffCommits" : true,
- "updatePullRequests" : "always | on-conflicts | never",
+ "updatePullRequests" : "on-conflicts",
"updates" : {
"groupId" : "org.acme",
- "version" : "1.0"
+ "version" : {
+ "prefix" : "1.0"
+ }
}
"groupId" : "com.example",
- "version" : "1.1."
+ "version" : {
+ "prefix" : "1.1."
+ }
} |
f3c58cc reduces the diff to: error: repo-specific-configuration.md:211:1: Diff between parsed input (-) and encoded object (+):
"signoffCommits" : true,
- "updatePullRequests" : "always | on-conflicts | never",
+ "updatePullRequests" : "on-conflicts",
"updates" : { |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3571 +/- ##
==========================================
+ Coverage 89.79% 89.81% +0.01%
==========================================
Files 174 174
Lines 5029 5038 +9
Branches 491 489 -2
==========================================
+ Hits 4516 4525 +9
Misses 513 513 ☔ View full report in Codecov by Sentry. |
This machinery also detects typos in the example options like this: --- a/modules/docs/mdoc/repo-specific-configuration.md
+++ b/modules/docs/mdoc/repo-specific-configuration.md
@@ -144,7 +144,7 @@ updates.fileExtensions = [".scala", ".sbt", ".sbt.shared", ".sc", ".yml", ".md",
# you don't change it yourself.
# If "never", Scala Steward will never update the PR
# Default: ${PullRequestUpdateStrategy.default.asJson.noSpaces}
-updatePullRequests = "always"
+updatePullRequest = "always" which results in a build failure: error: repo-specific-configuration.md:211:1: Diff between parsed input (-) and encoded object (+):
"signoffCommits" : true,
- "updatePullRequest" : "always",
"updates" : { The encoded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Less likely to sneak in typos in the future 😄
This checks that the example
.scala-steward.conf
in the docs is equivalent to the JSON one gets when parsing, decoding and encoding that example. It ensures that the values used in the example are the same as the values in the decodedRepoConfig
.With this change, the
docs/mdoc
task fails currently with:In subsequent commits I'll will fix these reported differences.
Closes: #1341