-
Notifications
You must be signed in to change notification settings - Fork 90
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: adds a default warning for 422 and 302 responses #154
Conversation
Codecov Report
@@ Coverage Diff @@
## master #154 +/- ##
==========================================
+ Coverage 93.1% 93.11% +0.01%
==========================================
Files 61 61
Lines 2131 2136 +5
==========================================
+ Hits 1984 1989 +5
Misses 147 147
Continue to review full report at Codecov.
|
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 like the idea. We might as well exhaust the discouraged status code in the handbook while we're at it
9fc9061
to
feec9ec
Compare
I changed the structure a bit. Since these 302 and 422 warnings are similar, I put the checks in one for-loop rather than in the top level if-else statement. Now the module says, "If no status codes, error. Else, check for discouraged status codes and validate success codes." |
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.
Only one small change to make - I will merge after
- IBM Handbook says 400 response should be used instead of 422 - IBM Handbook prefers 303 and 307 responses over 302 - added ibm_status_code_guidelines config option with default warning - added a test to ensure warning issued for 422 response - added a test to ensure warning issued for 302 response
feec9ec
to
ccdb9d3
Compare
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.
Looks good! 👍
# [0.26.0](v0.25.0...v0.26.0) (2020-03-16) ### Features * adds a check for 422 and 302 status codes ([#154](#154)) ([4d5ba65](4d5ba65))
🎉 This PR is included in version 0.26.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Reason:
Changes:
Tests