duplex
1.0.0
雙工允許您在Elixir項目中搜索類似的代碼塊。
遠程(無存儲庫克隆)
mix escript.install https://raw.githubusercontent.com/zirkonit/duplex/master/duplex
本地
mix do escript.build, escript.install
cd /path/to/project
~/.mix/escripts/duplex
:duplex到mix.exs中的deps.exs def deps do
[ { :duplex , "~> 0.1.1" } ]
end mix deps.get
iex - S mix
Duplex . show_similar 您可以通過與您自己的值添加下一行來更改config.exs上的默認值
config :duplex , threshold: 7 # filter AST nodes with `node.length + node.depth >= threshold`
# Than lower threshold, than simpler nodes will be included.
# Optimal value is around 7-10. Default is 7.
config :duplex , dirs: [ "lib" , "config" , "web" ] # directories to search for Elixir source files
config :duplex , n_jobs: 4 # number of threads