Skip to content

fix: include actual key name in /overrideconfig unsupported key error message#4874

Merged
arturcic merged 2 commits intoGitTools:mainfrom
denisbredikhin:main
Mar 16, 2026
Merged

fix: include actual key name in /overrideconfig unsupported key error message#4874
arturcic merged 2 commits intoGitTools:mainfrom
denisbredikhin:main

Conversation

@denisbredikhin
Copy link
Copy Markdown
Contributor

Description

  • ArgumentParser.cs: Interpolate the actual key name into the error message
  • ArgumentParserTests.cs: Update expected string in existing test case to match new format

Before
Could not parse /overrideconfig option: key1=value1. Unsupported 'key'.

After
Could not parse /overrideconfig option: key1=value1. Unsupported key 'key1'.

Related Issue

Resolves #4873

Motivation and Context

To have a clearer error message in case of GitVersion misconfiguration.

How Has This Been Tested?

Changes are minimal; testing with provided unit tests looks reasonable.

Checklist:

  • [ X] My code follows the code style of this project.
  • [ X] My change requires a change to the documentation.
  • [ X] I have updated the documentation accordingly.
  • [ X] I have added tests to cover my changes.
  • [ X] All new and existing tests passed.

Copilot AI review requested due to automatic review settings March 16, 2026 17:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves the clarity of GitVersion’s CLI error reporting when /overrideconfig is provided with an unsupported configuration key, aligning behavior with issue #4873.

Changes:

  • Update the /overrideconfig unsupported-key WarningException message to include the actual invalid key name.
  • Update the existing unit test expected string to match the new error message format.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/GitVersion.App/ArgumentParser.cs Includes the actual override key in the unsupported-key error message.
src/GitVersion.App.Tests/ArgumentParserTests.cs Adjusts the expected exception message in the invalid overrideconfig test data.

… message

* Initial plan

* fix: include actual key name in /overrideconfig unsupported key error message

Co-authored-by: denisbredikhin <11455823+denisbredikhin@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: denisbredikhin <11455823+denisbredikhin@users.noreply.github.com>
Co-authored-by: Artur <artur.stolear@gmail.com>
@sonarqubecloud
Copy link
Copy Markdown

@arturcic arturcic enabled auto-merge March 16, 2026 20:51
@arturcic arturcic merged commit 97fa154 into GitTools:main Mar 16, 2026
118 checks passed
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 16, 2026

Thank you @denisbredikhin for your contribution!

This was referenced Mar 23, 2026
corpo-iwillspeak pushed a commit to crispthinking/athena-dotnet-client that referenced this pull request Mar 30, 2026
Updated
[coverlet.collector](https://github.com/coverlet-coverage/coverlet) from
8.0.0 to 8.0.1.

<details>
<summary>Release notes</summary>

_Sourced from [coverlet.collector's
releases](https://github.com/coverlet-coverage/coverlet/releases)._

## 8.0.1

### Fixed
- Fix [BUG] TypeInitializationException when targeting .NET Framework
[#​1818](coverlet-coverage/coverlet#1818)
- Fix [BUG] coverlet.MTP build fails with CS0400 due to
developmentDependency=true
[#​1827](coverlet-coverage/coverlet#1827)

### Improvements
- Additional improvements needed for .NET Framework instrumentation type
import
[#​1825](coverlet-coverage/coverlet#1825)

[Diff between 8.0.0 and
8.0.1](coverlet-coverage/coverlet@v8.0.0...v8.0.1)


Commits viewable in [compare
view](coverlet-coverage/coverlet@v8.0.0...v8.0.1).
</details>

Updated [GitVersion.MsBuild](https://github.com/GitTools/GitVersion)
from 6.6.0 to 6.7.0.

<details>
<summary>Release notes</summary>

_Sourced from [GitVersion.MsBuild's
releases](https://github.com/GitTools/GitVersion/releases)._

## 6.7.0

As part of this release we had [46
commits](GitTools/GitVersion@6.6.2...6.7.0)
which resulted in [3
issues](https://github.com/GitTools/GitVersion/milestone/85?closed=1)
being closed.

__Features__

- [__#​4369__](GitTools/GitVersion#4369)
[FEATURE]: Modernize YAML configuration serialization strategy by
[arturcic](https://github.com/arturcic) resolved in
[__!4686__](GitTools/GitVersion#4686) by
[copilot-swe-agent](https://github.com/apps/copilot-swe-agent),
[__!4688__](GitTools/GitVersion#4688) by
[copilot-swe-agent](https://github.com/apps/copilot-swe-agent),
[__!4886__](GitTools/GitVersion#4886) by
[arturcic](https://github.com/arturcic)

__Improvements__

- [__#​4880__](GitTools/GitVersion#4880) CI/CD
workflow hardening and release-process observability by
[arturcic](https://github.com/arturcic) resolved in
[__!4881__](GitTools/GitVersion#4881) by
[arturcic](https://github.com/arturcic)
- [__#​4883__](GitTools/GitVersion#4883)
Support nuget.org Trusted Publishing by
[arturcic](https://github.com/arturcic) resolved in
[__!4884__](GitTools/GitVersion#4884) by
[copilot-swe-agent](https://github.com/apps/copilot-swe-agent)

__Contributors__

2 contributors made this release possible.

<a href="https://github.com/arturcic"><img
src="https://avatars.githubusercontent.com/u/1760506?v=4" alt="arturcic"
height="32" width="32"/></a> <a
href="https://github.com/apps/copilot-swe-agent"><img
src="https://avatars.githubusercontent.com/in/1143301?v=4"
alt="copilot-swe-agent" height="32" width="32"/></a>
### SHA256 Hashes of the release artifacts
- `180fd7cf40fdfacf2c251176a4b613a444db2b40af477fd07a7c6d4d6b355dc6 -
gitversion-linux-arm64-6.7.0.tar.gz`
- `254d1de40ac82af4c17771f996cb6656e6f3ba0f9cd2f6e94e07d983ac79595a -
gitversion-linux-musl-arm64-6.7.0.tar.gz`
- `d59557ebd5fcd036387cf1c7e6fb82df7fe71b5409ec1a69fd4a0ba614ccbcb7 -
gitversion-linux-musl-x64-6.7.0.tar.gz`
- `e2012abfb3392a6f0ccf5f82738173c291b15bfdb2d5e9197777ec3f41b88f76 -
gitversion-linux-x64-6.7.0.tar.gz`
- `429108e0d51f98815b6fbf4ebba84cf53812a4c71eee67180456e8771e9f4320 -
gitversion-osx-arm64-6.7.0.tar.gz`
- `02f6b9ac0d70a18d8bc2c0e3eaf183377a2417ecadd5df452ab3150b4404182c -
gitversion-osx-x64-6.7.0.tar.gz`
- `873cdc294068cbbda43717e6384b849599d2d0db0db6f7c2592074c8f9386116 -
gitversion-win-arm64-6.7.0.zip`
- `55b43a1c1e1d174675ca1500410e64a0ad9904425f2329fe6b35b5368a31f629 -
gitversion-win-x64-6.7.0.zip`



## 6.6.2

As part of this release we had [30
commits](GitTools/GitVersion@6.6.1...6.6.2)
which resulted in [2
issues](https://github.com/GitTools/GitVersion/milestone/84?closed=1)
being closed.

__Improvements__

- [__#​4873__](GitTools/GitVersion#4873)
[ISSUE]: Improve error message for unsupported keys in /overrideconfig
command line option by
[denisbredikhin](https://github.com/denisbredikhin) resolved in
[__!4874__](GitTools/GitVersion#4874) by
[denisbredikhin](https://github.com/denisbredikhin)
- [__#​4877__](GitTools/GitVersion#4877)
Define CI/CD publishing policy and secure token ownership boundaries by
[arturcic](https://github.com/arturcic) resolved in
[__!4876__](GitTools/GitVersion#4876) by
[arturcic](https://github.com/arturcic)

__Contributors__

2 contributors made this release possible.

<a href="https://github.com/denisbredikhin"><img
src="https://avatars.githubusercontent.com/u/11455823?v=4"
alt="denisbredikhin" height="32" width="32"/></a> <a
href="https://github.com/arturcic"><img
src="https://avatars.githubusercontent.com/u/1760506?v=4" alt="arturcic"
height="32" width="32"/></a>
### SHA256 Hashes of the release artifacts
- `4d0637a80cdf5b615b0b5426f4c8a670db3f44d696bb68c2935b3ab801698090 -
gitversion-linux-arm64-6.6.2.tar.gz`
- `11e0bd3daa1b40f63dc5f61192a41a9d59f76a2513ddefa28ec47ac65c34ee00 -
gitversion-linux-musl-arm64-6.6.2.tar.gz`
- `fa526a55aa10a80e53ab6e85896144e23350c7366d6307b0f353d9d2d8353e73 -
gitversion-linux-musl-x64-6.6.2.tar.gz`
- `1c436efca8063f936ef9144b71350e813ae1a0d6dcd8256ef85c5254ce00714c -
gitversion-linux-x64-6.6.2.tar.gz`
- `3c7c331999ff6a69ca4942f4dbc84a87998b5f278df509551be0160415f9e67e -
gitversion-osx-arm64-6.6.2.tar.gz`
- `fb4d8c16e64360e9fb7df1c507d30c5a959fc0c41e0db2bc2dbcc55808b6d24b -
gitversion-osx-x64-6.6.2.tar.gz`
- `d0dfba1cdec96efcf5742173aa249fcd8cd866bd0cc519539976c0eaf49556f6 -
gitversion-win-arm64-6.6.2.zip`
- `8013cc3422d26ef014c903554be8be6a1b835514e8064f0ec6a63ca52c7f3729 -
gitversion-win-x64-6.6.2.zip`



## 6.6.1

As part of this release we had [67
commits](GitTools/GitVersion@6.6.0...6.6.1)
which resulted in [2
issues](https://github.com/GitTools/GitVersion/milestone/83?closed=1)
being closed.

__Improvements__

- [__#​4839__](GitTools/GitVersion#4839)
[ISSUE]: Refactor help and version command handling by
[arturcic](https://github.com/arturcic) resolved in
[__!4838__](GitTools/GitVersion#4838) by
[arturcic](https://github.com/arturcic)

__Contributors__

1 contributors made this release possible.

<a href="https://github.com/arturcic"><img
src="https://avatars.githubusercontent.com/u/1760506?v=4" alt="arturcic"
height="32" width="32"/></a>
### SHA256 Hashes of the release artifacts
- `abd80a77ebb3f4750255378f222076bef6884be46b07ee5bb35d84a5c2d5b6fb -
gitversion-linux-arm64-6.6.1.tar.gz`
- `37cf7184e9f94de20d1dfd80f5d94a20c74327cab241ba90116531559630a9df -
gitversion-linux-musl-arm64-6.6.1.tar.gz`
- `bdd393d9ab7a37811bc04a9b92687e99de6b5c0162be416aa6db0dbb9dae51ec -
gitversion-linux-musl-x64-6.6.1.tar.gz`
- `613b1247794aaf541b3060d5d5d6ef53e6b7a5779b0bf446f7549ebf935a1d38 -
gitversion-linux-x64-6.6.1.tar.gz`
- `2c19105a672c0da445c6998429cd6034b864b707bcd830bb5d4e9862572cc3e2 -
gitversion-osx-arm64-6.6.1.tar.gz`
- `ee07876b25cd5c53a4500ac94373dd07e207db64fca67201daaa4a78397aba20 -
gitversion-osx-x64-6.6.1.tar.gz`
- `d333202ff9c95131644a1d093c8e75fd4e29277168d3bdd72342d95c11b9ef08 -
gitversion-win-arm64-6.6.1.zip`
- `9a4deffb3c8ad25276577d3a6b8a69d80c3b6a0cb8f0b9c3a933fac7a2c46bbc -
gitversion-win-x64-6.6.1.zip`



Commits viewable in [compare
view](GitTools/GitVersion@6.6.0...6.7.0).
</details>

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ISSUE]: Improve error message for unsupported keys in /overrideconfig command line option

4 participants