Nullary predicates always show "This query returned no results"

Open
#1,743 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
typescript
Domain
tooling

Research direction

Start by running the provided query predicate foo() { any() } in the VS Code extension and inspect the results view that displays the contradictory messages. Trace how nullary predicate results are labeled, then verify that the no-results message is not shown for a result and that the displayed count and wording are consistent.

Written by the indexing model from the issue text.

Description

bug VSCode

Describe the bug
A nullary predicate with a result shows the "This query returned no results" message even if it has a result.
It does show "1 result" in the top left as well leading to a contradictory view of results

Version
CodeQL extension version: 1.7.5
CodeQL CLI version: 2.11.3
Platform: linux x64

To reproduce
Run:

query predicate foo() { any() }

Look at the results

Expected behavior
Something like "1 nullary result" or "1 empty result".

Additional context
I don't think this is that important in general to fix as nullary predicates are not commonly used but it is wrong.

Dominant language
TypeScript
Stars
539
Forks
240
Avg merge
2d 6h
Merged PRs (30d)
29

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/vscode-codeql

All issues in github/vscode-codeql

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.