Summary
The js/unknown-directive query (also surfaced by GitHub Code Quality) reports Workflow DevKit's required function directives 'use workflow' and 'use step' as unknown. Its generated autofix advice says to delete or replace them. Doing so changes the function's durable workflow/step behavior.
Workflow SDK documents both directives: https://workflow-sdk.dev/
Minimal reproduction
export async function exampleWorkflow() {
'use workflow';
return await exampleStep();
}
async function exampleStep() {
'use step';
return 42;
}
Run the JavaScript Code Quality suite containing js/unknown-directive. Both directive prologues receive Unknown directive findings.
Expected behavior
Recognize these two exact Workflow SDK directives as known, or otherwise avoid suggesting their removal in projects using Workflow SDK. Continue detecting actual misspellings and unrelated unknown directives.
Actual impact
In our private repository, github-code-quality[bot] has repeatedly commented on required workflow and step declarations, including tests. Some proposed fixes would silently remove durability or misclassify a step as a workflow. They can be dismissed individually as false positives, but they recur on changed lines.
References
Summary
The
js/unknown-directivequery (also surfaced by GitHub Code Quality) reports Workflow DevKit's required function directives'use workflow'and'use step'as unknown. Its generated autofix advice says to delete or replace them. Doing so changes the function's durable workflow/step behavior.Workflow SDK documents both directives: https://workflow-sdk.dev/
Minimal reproduction
Run the JavaScript Code Quality suite containing
js/unknown-directive. Both directive prologues receiveUnknown directivefindings.Expected behavior
Recognize these two exact Workflow SDK directives as known, or otherwise avoid suggesting their removal in projects using Workflow SDK. Continue detecting actual misspellings and unrelated unknown directives.
Actual impact
In our private repository,
github-code-quality[bot]has repeatedly commented on required workflow and step declarations, including tests. Some proposed fixes would silently remove durability or misclassify a step as a workflow. They can be dismissed individually as false positives, but they recur on changed lines.References