ash-project / ash-project/igniter
`Igniter.Refactors.Rename.rename_function/3` should update the `@spec` associated with the definition
Open
bug
- Dominant language
- Elixir
- Stars
- 404
- Forks
- 75
- Avg merge
- 9h 58m
- Merged PRs (30d)
- 3
Description
Something I noticed while testing a `rename_function` call. It will upgrade the function name at the definition site, but not the `@spec` preceding it, so renaming `foo/2` to `bar/2` will get you something like:
```elixir
@spec foo(term(), term()) :: term()
def bar(x, y) do
...
end
```
Contributor guide
Research direction
Start at Igniter.Refactors.Rename.rename_function/3 and trace how the function definition is renamed, then inspect how the preceding @spec is represented. Done means renaming foo/2 to bar/2 also changes the associated spec name while preserving its arguments and return type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100