katana-code
katana-code copied to clipboard
Code Utilities for Erlang
## Bug Description While using rebar3_format (that uses katana-code for its formatter), I've seen a bug that it's removing the single quotes from macros that have dashes in the name....
## Bug Description When running `ktn_dodger:parse_file/1,2` on a file with an `-else.`, it reports an error (or, if using `no_fail`, it just parses that as text instead of an actual...
When running `ktn_code:parse_file/3` with `nofail` on a file like this one… ```erlang -module(recipe_15). -export([x/0]). x() -> "This is an unterminated string, some:more(stuff). ``` …the result looks like this… ```erlang -module(recipe_15)....
Given the following module ``` -module(macros). -define(MATCH_NAME(), #{name := "Per"}). is_adult(?MATCH_NAME()) -> false. ``` ``` 1> File = "path/to/macros.erl". "path/to/macros.erl" 2> {ok, Dev} = file:open(File, [read]). {ok, }. 3> ktn_dodger:parse_form(Dev,...
We should definitely write up a ticket to recover these 2 tools once they incorporate the new katana version we'll create with these changes. _Originally posted by @elbrujohalcon in https://github.com/inaka/katana-code/pull/83#discussion_r1660542361_
## Is your feature request related to a problem? Please describe https://github.com/inaka/elvis_core/pull/395#issuecomment-2810045798 ## Describe the solution you'd like I would like to have a function that will traverse the entire...