Commit graph

5 commits

Author SHA1 Message Date
Zach Daniel
a234998886 fix: properly move to pattern matches in scope 2024-07-19 10:28:36 -04:00
Zach Allaun
43a2f39943
refactor: simplify zipper usage (#45)
* build: add otp version to elixir in .tool-versions

* refactor: don't make subtree zippers unless needed in `Igniter.Code.Common`

* refactor: internal function in `Igniter.Code.Common`

* docs: add docstring for `Igniter.Code.Common.use_aliases/2`

* refactor: simplify zipper usage

Refactored using these two general rules:

1. Don't make subtrees unnecessarily

    zipper
    |> Zipper.subtree()
    |> Zipper.root()

    # is equivalent to
    zipper
    |> Zipper.node()

2. Access `zipper.node` when appropriate

    zipper
    |> Zipper.node()
    |> case do
      ...
    end

    # is equivalent to
    case zipper.node do
      ...
    end

* fix: remove redundant case clause in `Igniter.Code.Common`
2024-07-11 14:25:20 -04:00
Zach Daniel
ccb0984314 improvement: Module.find_and_update_or_create_module
Some checks are pending
CI / ash-ci (push) Waiting to run
2024-06-28 00:36:04 -04:00
Zach Daniel
55d0b061e1 improvement: draw the rest of the owl 2024-06-12 18:22:08 -04:00
Zach Daniel
260d56532b improvement: add CI/build and get it passing locally 2024-05-31 22:59:36 -04:00