sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.1k stars 1.28k forks source link

Codecov coverage looks incorrect for sentry extension repository #3453

Open nicksnyder opened 5 years ago

nicksnyder commented 5 years ago

Just looking at this file in Codecov, it doesn't make sense which lines that are red https://codecov.io/gh/sourcegraph/sentry/src/master/src/extension.ts

image

This makes me worry that it is misconfigured.

I quickly glanced at https://github.com/codecov/example-typescript and the FAQ states that we need this in the tsconfig.json:

{
  "compilerOptions": {
    "sourceMap": true,
  }
}

I don't see this in the sentry repo, but I do see this option in sourcegraph/sourcegraph (where codecov works). Maybe all you need to do is add this configuration?

cc @lguychard for advice

vanesa commented 5 years ago

I added "sourceMap": true, to Sentry's tsconfig but then got the typecheck error that sourceMap and inlineSourceMap can't be setup together, so I replaced inlineSourceMap with sourceMap but it didn't change anything in Codecov. Will try again tomorrow.

lguychard commented 5 years ago

There's zero coverage of extension.ts. On a file that does have coverage, like handler.ts, the line matches make sense to me if I compare them with the tests: https://codecov.io/gh/sourcegraph/sentry/src/master/src/handler.ts