question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Usage report and contexts giving a lot of false positives.

See original GitHub issue

When getting a usage report, it is complaining about all contexted keys. I’ve added _plural to my Derived Key Rules setting to avoid most of them, but for custom contexts it seems like they have to be added manually.

Let’s say I have the following keys:

"match": "Match"
"match_plural": "Matches"
"match_count": "{{count}} match"
"match_count_plural":  "{{count}} matches"
"match_numbered": "Match number {{number}}"

The usage report would mark the lower three ones as unused even if they are used in the code and targeted through { context: “numbered” } (or similar).

I tried but haven’t got either regex or glob matching to work for keys containing _ but didn’t succeed.

This might be possible somehow and I’m just missing it.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
antfucommented, Jul 27, 2021

Continues in #570

0reactions
bratziecommented, Jun 29, 2021

Thank you for the reply! 😃

I’m using that already for some base cases (like _plural and _0 (and so on)). I think what would solve this issue in a broader sense would be adding something like a checkbox setting that said “ignore keys with underscore ( _ ) in Usage Report”.

With the current implementation I don’t think usage report understands if context is used, so if you use context a lot, you would have to add every unique context to the Derived Key Rules to have any use of the usage report feature.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The impact of false positive COVID-19 results in an area of low ...
A false positive result is less likely to be detected during times of high prevalence as the result will receive less scrutiny.
Read more >
P-Values, Error Rates, and False Positives - Statistics By Jim
Learn how Bayesian statistics and simulation studies help us understand the false positive rates associated with p-values.
Read more >
Detecting and avoiding likely false‐positive findings – a ...
ABSTRACT Recently there has been a growing concern that many published research findings do not hold up in attempts to replicate them.
Read more >
How to Reduce False Positives in AML Transaction Monitoring
A high false-positive rate means you engage in a lot of these AML case management processes and stay at risk of missing reporting...
Read more >
Potential for False Positive Results with Antigen Tests ... - FDA
The FDA is aware of reports of false positive results associated with antigen tests used in nursing homes and other settings and continues ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found