-
Notifications
You must be signed in to change notification settings - Fork 2
cleanup code #44
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
cleanup code #44
Conversation
Codecov Report
@@ Coverage Diff @@
## master #44 +/- ##
=======================================
Coverage 85.83% 85.83%
=======================================
Files 3 3
Lines 120 120
Branches 28 27 -1
=======================================
Hits 103 103
Misses 17 17
Continue to review full report at Codecov.
|
Co-Authored-By: Loic Guychard <l.guychard@gmail.com>
Co-Authored-By: Loic Guychard <l.guychard@gmail.com>
| const repoPattern = /(github\.com|gitlab\.com)\/([^\?\#\/]+\/[^\?\#\/]*)/gi | ||
| export function getParamsFromUriPath(textDocumentURI: string): Params | null { | ||
| let paramsRepo | ||
| let fileMatch |
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.
Declare a type (else they are any)
| "linePatterns": [ | ||
| // List of RegExp patterns that match error handling code, e.g. "throw new Error+\\(['\"]([^'\"]+)['\"]\\)", | ||
| // !! Make sure to capture the error message in a RegExp group !! | ||
| // !! Make sure to capture the error message in a RegExp group and escape special characters to ensure compatibility with JSON Schema!! |
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'd drop the "Schema" because you need to escape to be compliant with JSON (not with the schema)
The exclamation marks seem very aggressive
Clean up code, update comments and readme, use URL API for repo extraction, match with any
throw new TypeError().Addresses: #37 - "Use URL API on getParamsFromUriPath"
#7 - "Doesn't match throw new TypeError()"
#40 - "Sentry extension should wrap the query in double quotes"