Skip to content

Conversation

@vanesa
Copy link
Contributor

@vanesa vanesa commented May 23, 2019

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"

@codecov-io
Copy link

codecov-io commented May 24, 2019

Codecov Report

Merging #44 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           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
Impacted Files Coverage Δ
src/handler.ts 100% <100%> (ø) ⬆️
src/extension.ts 75.71% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a5d589a...345e593. Read the comment docs.

@vanesa vanesa requested a review from lguychard May 24, 2019 05:28
@vanesa vanesa requested a review from lguychard May 30, 2019 01:14
vanesa and others added 5 commits June 3, 2019 12:50
const repoPattern = /(github\.com|gitlab\.com)\/([^\?\#\/]+\/[^\?\#\/]*)/gi
export function getParamsFromUriPath(textDocumentURI: string): Params | null {
let paramsRepo
let fileMatch
Copy link
Contributor

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!!
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants