rrrene / credo

A static code analysis tool for the Elixir language with a focus on code consistency and teaching.
http://credo-ci.org/
MIT License
4.91k stars 414 forks source link

Fix incorrect columns for dbg and IO.inspect #1126

Closed mhanberg closed 4 months ago

mhanberg commented 4 months ago

Previously, this was backfilling the column based on analyzing the source code line, but the column is already available in the AST, so we instead take it from there.

This allows IDE type tools to accurately create refactor "code actions".

mhanberg commented 4 months ago

I think there was a formatting error on the master branch, went ahead and fixed it here, I can open a new PR if that is preferable tho.

rrrene commented 4 months ago

@mhanberg Thx!