Browse Source
The patterns to detect function boundary for Elixir language has been added. * ln/userdiff-elixir: userdiff: add Elixir to supported userdiff languagesmaint

13 changed files with 78 additions and 0 deletions
@ -0,0 +1,5 @@ |
|||||||
|
defmodule RIGHT do |
||||||
|
end |
||||||
|
# |
||||||
|
# |
||||||
|
# ChangeMe; do not pick up 'end' line |
@ -0,0 +1,6 @@ |
|||||||
|
defmodule Test do |
||||||
|
test "RIGHT" do |
||||||
|
assert true == true |
||||||
|
assert ChangeMe |
||||||
|
end |
||||||
|
end |
@ -0,0 +1,5 @@ |
|||||||
|
def function(RIGHT, arg) do |
||||||
|
# comment |
||||||
|
# comment |
||||||
|
ChangeMe |
||||||
|
end |
@ -0,0 +1,5 @@ |
|||||||
|
defmacro foo(RIGHT) do |
||||||
|
# Code |
||||||
|
# Code |
||||||
|
ChangeMe |
||||||
|
end |
@ -0,0 +1,9 @@ |
|||||||
|
defmodule RIGHT do |
||||||
|
@moduledoc """ |
||||||
|
Foo bar |
||||||
|
""" |
||||||
|
|
||||||
|
def ChangeMe(a) where is_map(a) do |
||||||
|
a |
||||||
|
end |
||||||
|
end |
@ -0,0 +1,8 @@ |
|||||||
|
defmodule Foo do |
||||||
|
def fun(RIGHT) do |
||||||
|
# Code |
||||||
|
# Code |
||||||
|
# Code |
||||||
|
ChangeMe |
||||||
|
end |
||||||
|
end |
@ -0,0 +1,9 @@ |
|||||||
|
defmodule MyApp.RIGHT do |
||||||
|
@moduledoc """ |
||||||
|
Foo bar |
||||||
|
""" |
||||||
|
|
||||||
|
def ChangeMe(a) where is_map(a) do |
||||||
|
a |
||||||
|
end |
||||||
|
end |
@ -0,0 +1,5 @@ |
|||||||
|
defp function(RIGHT, arg) do |
||||||
|
# comment |
||||||
|
# comment |
||||||
|
ChangeMe |
||||||
|
end |
@ -0,0 +1,6 @@ |
|||||||
|
defprotocol RIGHT do |
||||||
|
@doc """ |
||||||
|
Calculates the size (and not the length!) of a data structure |
||||||
|
""" |
||||||
|
def size(data, ChangeMe) |
||||||
|
end |
@ -0,0 +1,5 @@ |
|||||||
|
defimpl RIGHT do |
||||||
|
# Docs |
||||||
|
# Docs |
||||||
|
def foo(ChangeMe), do: :ok |
||||||
|
end |
Loading…
Reference in new issue