Skip to content

Commit 73bece6

Browse files
Add query for using token when not cancellable
1 parent 280bf8b commit 73bece6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* @name Using token for non-cancellable progress bar
3+
* @kind problem
4+
* @problem.severity warning
5+
* @id vscode-codeql/progress-not-cancellable
6+
* @description If we call `withProgress` with `cancellable: false` then the
7+
* token that is given to us should be ignored because it won't ever be cancelled.
8+
*/
9+
10+
import javascript
11+
import ProgressBar
12+
13+
from ProgressBar t
14+
where not t.isCancellable() and t.usesToken()
15+
select t, "The token should not be used when the progress bar is not cancelable"

0 commit comments

Comments
 (0)