taskless check given a path outside the project root returns "success": true with no findings and exits 0. The same happens for a path that doesn't exist at all. Is that intended?
It came up building a comparison repo (ty, Taskless, pylint and ruff side by side). A script pointed check at a folder outside the repo, and the Taskless column read as "missed everything" when nothing had run.
Repro
CLI 0.12.0-20261006162512x92b3715, in a project with one sg rule that flags if cond: when cond is a function defined in the same file. The same 5-line file, in different places:
Path passed to check |
Result |
examples/bug.py (inside the project) |
success: true, 1 finding |
/tmp/elsewhere/bug.py (absolute, outside) |
success: true, 0 findings, exit 0 |
/tmp/elsewhere/ (directory, outside) |
success: true, 0 findings |
../elsewhere/bug.py (relative, outside) |
success: true, 0 findings |
/no/such/file.py (doesn't exist) |
success: true, 0 findings, exit 0 |
printf 'def cond(): ...\n\n\nif cond:\n pass\n' > /tmp/elsewhere/bug.py
npx taskless check --json /tmp/elsewhere/bug.py
# {"success":true,"results":[],"notices":[]}
npx taskless check /no/such/file.py; echo $?
# (no output)
# 0
The inside run carries the usual "Rules were not verified" notice. The outside runs have no notices at all, which reads like no rule ran.
The question
If scanning outside the project is out of scope, that's reasonable, but the result should say so. Two ways it could:
- refuse with an error naming the path, and a non-zero exit
- or keep scanning nothing, but return
success: false (or a notice) so a caller can tell "clean" from "didn't look"
A path that doesn't exist seems like an error either way.
0.11.1 fixed taskless test reporting a pass when zero fixtures ran. This is that problem one level up: a check that reports clean when it didn't run is hard to catch from the outside.
taskless checkgiven a path outside the project root returns"success": truewith no findings and exits 0. The same happens for a path that doesn't exist at all. Is that intended?It came up building a comparison repo (ty, Taskless, pylint and ruff side by side). A script pointed
checkat a folder outside the repo, and the Taskless column read as "missed everything" when nothing had run.Repro
CLI
0.12.0-20261006162512x92b3715, in a project with one sg rule that flagsif cond:whencondis a function defined in the same file. The same 5-line file, in different places:checkexamples/bug.py(inside the project)success: true, 1 finding/tmp/elsewhere/bug.py(absolute, outside)success: true, 0 findings, exit 0/tmp/elsewhere/(directory, outside)success: true, 0 findings../elsewhere/bug.py(relative, outside)success: true, 0 findings/no/such/file.py(doesn't exist)success: true, 0 findings, exit 0The inside run carries the usual "Rules were not verified" notice. The outside runs have no notices at all, which reads like no rule ran.
The question
If scanning outside the project is out of scope, that's reasonable, but the result should say so. Two ways it could:
success: false(or a notice) so a caller can tell "clean" from "didn't look"A path that doesn't exist seems like an error either way.
0.11.1 fixed
taskless testreporting a pass when zero fixtures ran. This is that problem one level up: a check that reports clean when it didn't run is hard to catch from the outside.