Closed avylove closed 1 year ago
Hi @avylove ,
We're sorry, this post is outdated indeed. We'll correct it.
Currently, the metrics are active by default and the metrics.enabled
config option doesn't exist anymore.
If you remove this option from your config and you hover over a function in VSCode, you should see its code quality metrics:
=> The overall quality score
Let us know if you still experience issues with this.
So it seems the issue is a little different than I described. My .sourcery.yaml
file only has these contents
refactor:
python_version: '2.7'
With that I can not see the metrics. If I remove that and have a blank file, I can see the metrics. This seems like unexpected behavior.
@avylove I think the problem there is the '2.7' - we don't support Python 2.
Our refactorings/metrics all have a sort of in-built default minimum Python version of >= 3.3, so specifying anything lower than that means they will not show up. We should certainly be more explicit about this in our documentation if it isn't clear.
Ah, I see. Setting it for 3.3 did the trick.
Checklist
Description
According to this post, metrics can be enabled in VSCode by adding
This does seem to work, but now my other settings are ignored in the IDE, the cli complains
(metrics -> enabled) unexpected key 'enabled' found
, and mypython_version
setting gets ignored in the IDE.Since this is an older post I looked to see if I could find updated documentation. I tried looking for a setting for the extension but didn't see one and setting
quality_threshold
didn't display the metrics, either.Debug Information
IDE Version:
VSCode 1.71.2
Sourcery Version:
Sourcery 0.12.9 Sourcery-cli 0.12.10
Operating system and Version:
Fedora 36