Update messages/descriptions with how to fix the alert
This commit is contained in:
Родитель
4346cc6e98
Коммит
84df4b64d8
|
@ -3,8 +3,10 @@
|
|||
* @kind problem
|
||||
* @problem.severity warning
|
||||
* @id vscode-codeql/progress-not-cancellable
|
||||
* @description If we call `withProgress` with `cancellable: false` then the
|
||||
* @description If we call `withProgress` without `cancellable: true` then the
|
||||
* token that is given to us should be ignored because it won't ever be cancelled.
|
||||
* This makes the code more confusing as it tries to account for cases that can't
|
||||
* happen. The fix is to either not use the token or make the progress bar cancellable.
|
||||
*/
|
||||
|
||||
import javascript
|
||||
|
@ -12,4 +14,4 @@ import ProgressBar
|
|||
|
||||
from ProgressBar t
|
||||
where not t.isCancellable() and t.usesToken()
|
||||
select t, "The token should not be used when the progress bar is not cancelable"
|
||||
select t, "The token should not be used when the progress bar is not cancelable. Either stop using the token or mark the progress bar as cancellable."
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
* @description If we call `withProgress` with `cancellable: true` but then
|
||||
* ignore the token that is given to us, it will lead to a poor user experience
|
||||
* because the progress bar will appear to be canceled but it will not actually
|
||||
* affect the background process.
|
||||
* affect the background process. Either check the token and respect when it
|
||||
* has been cancelled, or mark the progress bar as not cancellable.
|
||||
*/
|
||||
|
||||
import javascript
|
||||
|
@ -14,4 +15,4 @@ import ProgressBar
|
|||
|
||||
from ProgressBar t
|
||||
where t.isCancellable() and not t.usesToken()
|
||||
select t, "This progress bar is $@ but the token is not used", t.getCancellableProperty(), "cancellable"
|
||||
select t, "This progress bar is $@ but the token is not used. Either use the token or mark the progress bar as not cancellable.", t.getCancellableProperty(), "cancellable"
|
||||
|
|
Загрузка…
Ссылка в новой задаче