Skip to content
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

Some important CodeInspect hints do not get shown (too low confidence?) #14

Open
SjoerdSmitWolfram opened this issue Sep 13, 2022 · 1 comment

Comments

@SjoerdSmitWolfram
Copy link

The code error Which[a, b, a, c] gets picked up by the plugin, but a related one like Which[a, b, c] does not. Presumably this is because CodeInspect assigns a relatively low confidence (0.55) to this case?

CodeInspect["Which[a, b, a, c]"]
CodeInspect["Which[a, b, c]"]

This is rather unfortunate, since this is a pretty important and common error to catch. I don't know what the proper solution is, but I feel like this is worth addressing.

@bostick bostick transferred this issue from WolframResearch/vscode-wolfram Sep 15, 2022
@bostick
Copy link

bostick commented Sep 15, 2022

The problem is that issues that have to do with argument counts (like CodeInspect["Which[a, b, c]"]) do not currently have good technology for distinguishing when a pattern sequence represents the correct arguments.

I mean like with:

CodeInspect["foo[c___] := Which[a, b, c]"]

where c is actually a sequence of arguments.

It would be really good for CodeInspector` to get to the point of understanding these things.

So issues about argument counts have low confidence (for now).

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

No branches or pull requests

2 participants