Interactive fix is not working for me
gizmomogwai opened this issue · comments
When I run dscanner in version 4c759b0
against my code, I get for example:
dscanner fix
[1 / 5] ./source/tui/package.d(448:5): Warning: Auto function without return statement, prefer replacing auto with void (auto_function_check)
auto setInputHandler(InputHandler inputHandler)
^^^^
0) Skip
1) Replace `auto` with `void`
> 1
core.exception.ArrayIndexError@src/dscanner/analysis/run.d(463): index [1] is out of bounds for array of length 1
----------------
??:? object.Throwable.TraceInfo core.runtime.defaultTraceHandler(void*) [0x10246bad3]
/Users/christian.koestlin/Sync/projects/_d/external/D-Scanner/src/dscanner/main.d:302 _Dmain [0x1020f5f03]
Seems like an off by one in the interactive handling...
ah, did some rewrites there and didn't add a test for that, good catch. Gonna add a test for this.
If you have any ideas for how to improve the CLI as well, feel free to open more issues for those.
Also feel free to open issues for autofix suggestions for existing or new checks.
Thanks for the quick fix ... works for me now. I think I need to install VSCode with your plugin now :)
When will the fix suggestion fix land in d-plug?
will be in the next nightly build in ~4 hours
awesome ... works nicely!