Skip to content

Commit fcf10db

Browse files
committed
refactor: moved Dataflow to refactor namespace
1 parent d7dc2cc commit fcf10db

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
defmodule Refactorex.Dataflow do
1+
defmodule Refactorex.Refactor.Dataflow do
22
alias Sourceror.Zipper, as: Z
33

44
defguard is_variable(node)

lib/refactorex/refactor/function/extract_anonymous_function.ex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ defmodule Refactorex.Refactor.Function.ExtractAnonymousFunction do
44
kind: "refactor.extract",
55
works_on: :selection
66

7-
alias Refactorex.Dataflow
8-
97
alias Refactorex.Refactor.{
8+
Dataflow,
109
Function,
1110
Module
1211
}

lib/refactorex/refactor/variable.ex

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
defmodule Refactorex.Refactor.Variable do
2-
alias Refactorex.Dataflow
3-
alias Refactorex.Refactor.AST
42
alias Sourceror.Zipper, as: Z
53

4+
alias Refactorex.Refactor.{
5+
AST,
6+
Dataflow
7+
}
8+
69
def at_one?(%{node: {name, _, nil}} = zipper) do
710
cond do
811
not is_atom(name) or name in ~w(binary _)a ->

lib/refactorex/refactor/variable/underscore_not_used.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Refactorex.Refactor.Variable.UnderscoreNotUsed do
44
kind: "quickfix",
55
works_on: :line
66

7-
alias Refactorex.Dataflow
7+
alias Refactorex.Refactor.Dataflow
88

99
def can_refactor?(%{node: node}, line) do
1010
node
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
defmodule Refactorex.DataflowTest do
1+
defmodule Refactorex.Refactor.DataflowTest do
22
use ExUnit.Case
33

4-
alias Refactorex.Refactor.AST
5-
alias Refactorex.Dataflow
4+
alias Refactorex.Refactor.{
5+
AST,
6+
Dataflow
7+
}
68

79
test "lists all variables inside simple function with constants" do
810
assert_has_variables(

0 commit comments

Comments
 (0)