-
Notifications
You must be signed in to change notification settings - Fork 35
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
feat: provide the actual bad string in ValidateScheme #20
feat: provide the actual bad string in ValidateScheme #20
Conversation
Codecov Report
@@ Coverage Diff @@
## master #20 +/- ##
==========================================
+ Coverage 96.1% 97.22% +1.11%
==========================================
Files 9 11 +2
Lines 154 180 +26
Branches 21 25 +4
==========================================
+ Hits 148 175 +27
+ Misses 6 5 -1
Continue to review full report at Codecov.
|
@pratik97 a few issues here we should fix. I think the output would be a bit hard to read, especially when we apply the same to hosts, etc.
the invalid string in the lockfile is "http", which is wrongly showing here as "https" but regardless, it is too blended. How about we format it something like this as an output:
Do you think that's clear for a user? The other issue is that the current code in this PR logs the allowed scheme, while we want to print out the bad one that is written in the lockfile and doesn't comply with the policy. |
another thought about how to print out the bad values is to maybe use an assertion style, something like this:
|
@pratik97 great work here. before we merge, can we:
|
@lirantal I will work on it this weekend. Sorry, for the late reply :/ |
@pratik97 sure |
@pratik97 thanks for pushing the commits, looks like you addressed all valdiators, or is there something still to be addressed in this PR? |
@lirantal no, I am done :) |
ok thanks, I shared on twitter a screenshot to get some feedback before we merge: https://twitter.com/liran_tal/status/1190655364758421507?s=20 One of which is to change |
@pratik97 let's add that change and I'll merge as a new major version. |
@lirantal done! |
Great stuff @pratik97, thanks for pushing this! ✨💪 |
fixes #10 |
Description
In ValidateScheme providing the actual scheme string against which we validate.
Types of changes
Related Issue
Fixes #10
Motivation and Context
How Has This Been Tested?
Added/Updated unit tests.
Screenshots (if appropriate):
Checklist: