8000 Bugfix: Erroneous deprecation warning by Tsche · Pull Request #912 · gcovr/gcovr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bugfix: Erroneous deprecation warning #912

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

Merged
merged 4 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ The following developers contributed to gcovr (ordered alphabetically):
TFA-N,
Thibault Gasc,
Tilo Wiedera,
Tsche,
Tyler W. Mace,
trapzero,
Will Thompson,
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ New features and notable changes:
Bug fixes and small improvements:

- Use replacement value of 0 for function call count ``NAN %``. (:issue:`910`)
- Fix erroneous deprecation warning. (:issue:`912`)

Documentation:

Expand Down
12 changes: 6 additions & 6 deletions gcovr/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,14 @@ def merge_options_and_set_defaults(


class UseSortUncoveredNumberAction(GcovrDeprecatedConfigOptionAction):
option = "--sort-key"
config = "sort-key"
option = "--sort"
config = "sort"
value = "uncovered-number"


class UseSortUncoveredPercentAction(GcovrDeprecatedConfigOptionAction):
option = "--sort-key"
config = "sort-key"
option = "--sort"
config = "sort"
value = "uncovered-percent"


Expand Down Expand Up @@ -552,7 +552,7 @@ class UseSortUncoveredPercentAction(GcovrDeprecatedConfigOptionAction):
["-u", "--sort-uncovered"],
group="output_options",
help=(
"Deprecated, please use '--sort-key uncovered-number' instead. "
"Deprecated, please use '--sort uncovered-number' instead. "
"Sort entries by number of uncovered lines or branches (if the option "
"--sort-branches is given). "
"The default order is increasing and can be changed by --sort-reverse. "
Expand All @@ -567,7 +567,7 @@ class UseSortUncoveredPercentAction(GcovrDeprecatedConfigOptionAction):
["-p", "--sort-percentage"],
group="output_options",
help=(
"Deprecated, please use '--sort-key uncovered-percent' instead. "
"Deprecated, please use '--sort uncovered-percent' instead. "
"Sort entries by percentage of uncovered lines or branches (if the option "
"--sort-branches is given). "
"The default order is increasing and can be changed by --sort-reverse. "
Expand Down
4 changes: 2 additions & 2 deletions tests/test_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,8 +734,8 @@ def test_sort_branch_and_not_uncovered_or_percent(caplog):
("-b", "--txt-metric branch"),
("--txt-branches", "--txt-metric branch"),
("--branches", "--txt-metric branch"),
("--sort-uncovered", "--sort-key uncovered-number"),
("--sort-percentage", "--sort-key uncovered-percent"),
("--sort-uncovered", "--sort uncovered-number"),
("--sort-percentage", "--sort uncovered-percent"),
],
ids=lambda option: option[0],
)
Expand Down
0