Repository navigation
refactor: align matcher names and regex argument order - #290
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
19e874f to
979fc8d
Compare
af4b76f to
00fea4c
Compare
00fea4c to
01194c0
Compare
25be21f to
75758f0
Compare
|
@alexliesenfeld i really like these changes but since it's a rather big change, what do u think about it? |
75758f0 to
f6f003e
Compare
|
I think this PR removes a bit too much context and speaking names may become question marks in certain contexts. suppose somebody imports the data structures and a reference to the mock server is "Remote". In our context it makes sense, but in the context of the using file, maybe not so much. I'd say this is a somewhat opinionated change, I'm probably a bit old-school in this regard and would stick to our naming if possible. I like the visibility changes though. Do you think we can revert the names? |
I'll split the PRs. the visibility change should land regardless, I can leave the naming conventions PR open for discussion and review whether all the names used make sense in context and are appropriately qualified. Will stack that on the visibility PR |
f6f003e to
5c10550
Compare
c6a3e52 to
b1b50da
Compare
|
Thanks for splitting out #312, that one's in. For the rest I'd keep this out of 0.9 since it's all crate-private anyway. I'd happily take the matcher side though: the unified verbs, |
b1b50da to
b77b9b3
Compare
|
I've narrowed this to the matcher changes and kept the |
|
thanks! |
Matcher internals use different words for the same operations, and regex comparators take their boolean arguments in the opposite order to other string comparators. This change aligns the names and uses
(case_sensitive, negated)consistently, updating all callers together.Comparatorsuffix while standardising verbs andJsoncasing, includingStringIncludesComparator,StringMatchesComparatorandJsonEqualsComparator.KeyValueOperatorvariants toAndandImplicationand remove the associated lint exception.All changes are confined to crate-private matcher code. Public APIs and matching behaviour are unchanged. This is not intended for 0.9.
The backend and HTTP client renames are deferred in draft #332, following the review comment. The two PRs are independent.
Validation:
cargo +stable test --offline --all-features(142 library tests, 149 integration tests and 136 doctests passed; 4 integration tests ignored),cargo +stable clippy --offline --all-targets --all-features, andcargo +stable fmt --all -- --check.