-
Notifications
You must be signed in to change notification settings - Fork 8
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
new checker contains
#152
new checker contains
#152
Conversation
Pull Request Test Coverage Report for Build 9632081552Details
💛 - Coveralls |
I believe #47 could be a subcase of contains but I'm not so confident with providing it in a error-compare rule |
Because of the strange use cases I reported here, I'm unsure. But they are definitely close yes |
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.
Thanks for working on this, a few remarks
Pull Request Test Coverage Report for Build 9635529714Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9635616469Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9635658244Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9635733489Details
💛 - Coveralls |
analyzer/testdata/src/checkers-default/contains/contains_test.go
Outdated
Show resolved
Hide resolved
Pull Request Test Coverage Report for Build 9636072731Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9636090503Details
💛 - Coveralls |
ae198ed
to
e9699f2
Compare
Pull Request Test Coverage Report for Build 9639678060Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9639712727Details
💛 - Coveralls |
LGTM 👍, a few stylistic remarks |
Pull Request Test Coverage Report for Build 9639996723Details
💛 - Coveralls |
You did the changes but didn't regenerate and commit the test and golden files |
I did from my phone, so I have no access to a terminal. The CI shall be doing the warning |
yes, I agree it should. Something to be added, because it's a common mistake, I did it too. I don't see something that could catch it right now what are your thoughts @Antonboom ? |
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.
leaving a comment so we don't forget
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.
Nice job! 🔥
0ccbcb1
to
30d2666
Compare
Pull Request Test Coverage Report for Build 9656918190Details
💛 - Coveralls |
Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>
Pull Request Test Coverage Report for Build 9656928741Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9656934424Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9656951923Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9666920543Details
💛 - Coveralls |
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.
I appreciate your work and left comments in purpose of future improvements of your code 👌
please, review it the last time (can check on the large code base) and we merge it
} | ||
} | ||
|
||
func TestContainsNotContainsReplacements_Bytes(t *testing.T) { |
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.
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.
How do you prevent these failing tests to fail the go test ./...
I don't get where is the magic?
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.
LGTM
Cannot run on my codebase for the moment, but LGTM 👍 |
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestContainsNotContainsReplacements_String(t *testing.T) { |
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.
I might have missed something but I would expected this here
func TestContainsNotContainsReplacements_String(t *testing.T) { | |
func TestContainsContainsReplacements_String(t *testing.T) { |
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.
No, Contains
+ NotContains
consistent with TestSameNotSameReplacements
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.
When you know it, you know it 😂🤣
It's obvious now.
Thanks
} | ||
} | ||
|
||
func TestContainsNotContainsReplacements_Bytes(t *testing.T) { |
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.
How do you prevent these failing tests to fail the go test ./...
I don't get where is the magic?
because of |
Thanks I learned something today. I had no idea the testdata folder I had on my codebase was not a convention in our codebase but something idiomatic |
Closes #54