Trying to keep the hook under a second on a repo with about four hundred feature files, so linting the whole project every commit is out. This is what I have:
sdods lint -p shop --json --file projects/shop/features/cart/cart.feature{
"ok": false,
"errors": [
{
"severity": "error",
"rule": "tags/suite",
"message": "Scenario must carry exactly one suite tag (@smoke, @regression, @sanity); found none.",
"file": "features/cart/cart.feature",
"line": 12,
"project": "shop"
}
],
"warnings": [],
"filesChecked": 1
}Two things I cannot find an answer to. Is rule a stable identifier I can filter on — we want to allow outline/title-format through in the hook and block everything else — or is it an implementation detail that might get renamed? And is file always relative to the project root even though I passed an absolute path, because that is what it looks like here and my hook has to map it back to the repo path to annotate the diff.
Happy to be told the hook is the wrong shape and I should just run the whole project.