From 69eb3a183a5e30ef7c1ab278285638aeaeb6358c Mon Sep 17 00:00:00 2001 From: Mitchell Hanberg Date: Sun, 15 Sep 2019 14:53:48 -0400 Subject: [PATCH] Disable silly credo rules and fix dialyzer error ParenthesesOnZeroArtiyDefs conflicts with the formatter and PipeChainStart is dumb (IMO) --- .credo.exs | 4 ++-- lib/wallaby/experimental/chrome.ex | 4 ++-- lib/wallaby/experimental/selenium.ex | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.credo.exs b/.credo.exs index 25d079da..7e633c87 100644 --- a/.credo.exs +++ b/.credo.exs @@ -81,7 +81,7 @@ {Credo.Check.Readability.ModuleAttributeNames}, {Credo.Check.Readability.ModuleDoc}, {Credo.Check.Readability.ModuleNames}, - {Credo.Check.Readability.ParenthesesOnZeroArityDefs}, + {Credo.Check.Readability.ParenthesesOnZeroArityDefs, false}, {Credo.Check.Readability.ParenthesesInCondition}, {Credo.Check.Readability.PredicateFunctionNames}, {Credo.Check.Readability.PreferImplicitTry}, @@ -102,7 +102,7 @@ {Credo.Check.Refactor.NegatedConditionsInUnless}, {Credo.Check.Refactor.NegatedConditionsWithElse}, {Credo.Check.Refactor.Nesting}, - {Credo.Check.Refactor.PipeChainStart}, + {Credo.Check.Refactor.PipeChainStart, false}, {Credo.Check.Refactor.UnlessWithElse}, {Credo.Check.Warning.BoolOperationOnSameValues}, diff --git a/lib/wallaby/experimental/chrome.ex b/lib/wallaby/experimental/chrome.ex index 19c0530f..e4ef6996 100644 --- a/lib/wallaby/experimental/chrome.ex +++ b/lib/wallaby/experimental/chrome.ex @@ -206,8 +206,8 @@ defmodule Wallaby.Experimental.Chrome do end @doc false - @spec start_session([start_session_opts]) :: {:ok, Session.t()} - def start_session(opts) do + @spec start_session([start_session_opts]) :: Wallaby.Driver.on_start_session() + def start_session(opts \\ []) do {:ok, base_url} = Chromedriver.base_url() create_session_fn = Keyword.get(opts, :create_session_fn, &WebdriverClient.create_session/2) diff --git a/lib/wallaby/experimental/selenium.ex b/lib/wallaby/experimental/selenium.ex index 087e20a8..12bf3b1e 100644 --- a/lib/wallaby/experimental/selenium.ex +++ b/lib/wallaby/experimental/selenium.ex @@ -91,7 +91,7 @@ defmodule Wallaby.Experimental.Selenium do end @doc false - @spec start_session([start_session_opts]) :: {:ok, Session.t()} + @spec start_session([start_session_opts]) :: Wallaby.Driver.on_start_session() def start_session(opts \\ []) do base_url = Keyword.get(opts, :remote_url, "http://localhost:4444/wd/hub/") create_session_fn = Keyword.get(opts, :create_session_fn, &WebdriverClient.create_session/2)