Allow the negate formating for cmp#6862
Merged
Vasu1105 merged 2 commits intoinspec:mainfrom Feb 20, 2024
Merged
Conversation
✅ Deploy Preview for chef-inspec canceled.
|
Contributor
|
Hello Taknok! Thanks for the pull request! Here is what will happen next:
Thank you for contributing! |
Contributor
Author
|
I allow myself to send a message to up the topic as there was no comment since the beginning and 2 month passed. |
Contributor
Author
|
Should I drop this PR ? Is this an unwanted feature ? |
aaronlippold
approved these changes
Feb 9, 2024
The 'cmp' matcher when used with a negation as 'should_not' does
has a confusion formating when control fails:
expected: 3
got: 3
This, because the 'format_actual' always pass 'false' to the
'format_expectation'. Thus the 'format_expectation' never reach the
'negate_str'.
Signed-off-by: Pg <pg.developper.fr@gmail.com>
Contributor
Author
Vasu1105
reviewed
Feb 13, 2024
Contributor
|
@Taknok This PR also missing DCO sign off please follow the Details https://github.com/chef/chef/blob/main/CONTRIBUTING.md#developer-certification-of-origin-dco and do the needful. |
Contributor
Author
|
Push force: The linting commit has also the DCO now. |
Vasu1105
approved these changes
Feb 16, 2024
Vasu1105
added a commit
that referenced
this pull request
Mar 13, 2024
* Allow the negate formating for cmp
The 'cmp' matcher when used with a negation as 'should_not' does
has a confusion formating when control fails:
expected: 3
got: 3
This, because the 'format_actual' always pass 'false' to the
'format_expectation'. Thus the 'format_expectation' never reach the
'negate_str'.
Signed-off-by: Pg <pg.developper.fr@gmail.com>
* Linting
Signed-off-by: Pg <pg.developper.fr@gmail.com>
Co-authored-by: Vasundhara Jagdale <vjagdale@progress.com>
---------
Signed-off-by: Pg <pg.developper.fr@gmail.com>
Co-authored-by: Vasundhara Jagdale <vjagdale@progress.com>
4 tasks
Vasu1105
added a commit
that referenced
this pull request
Mar 13, 2024
* Allow the negate formating for cmp
The 'cmp' matcher when used with a negation as 'should_not' does
has a confusion formating when control fails:
expected: 3
got: 3
This, because the 'format_actual' always pass 'false' to the
'format_expectation'. Thus the 'format_expectation' never reach the
'negate_str'.
* Linting
---------
Signed-off-by: Pg <pg.developper.fr@gmail.com>
Co-authored-by: Pg <pg.developper.fr@gmail.com>
Nik08
pushed a commit
that referenced
this pull request
Sep 13, 2024
* Allow the negate formating for cmp
The 'cmp' matcher when used with a negation as 'should_not' does
has a confusion formating when control fails:
expected: 3
got: 3
This, because the 'format_actual' always pass 'false' to the
'format_expectation'. Thus the 'format_expectation' never reach the
'negate_str'.
Signed-off-by: Pg <pg.developper.fr@gmail.com>
* Linting
Signed-off-by: Pg <pg.developper.fr@gmail.com>
Co-authored-by: Vasundhara Jagdale <vjagdale@progress.com>
---------
Signed-off-by: Pg <pg.developper.fr@gmail.com>
Co-authored-by: Vasundhara Jagdale <vjagdale@progress.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
The 'cmp' matcher when used with a negation as 'should_not' has a confusion formating when control fails:

This, because the 'format_actual' always pass 'false' to the 'format_expectation'. Thus the 'format_expectation' never reach the 'negate_str'.
When passing the negate value to the 'format_expectation' the output is more intuitive:

Types of changes
Checklist: