Format previously missed files

pull/93/head
Luke Imhoff 7 years ago
parent dac2471801
commit 1b121a0a39
  1. 7
      .credo.exs
  2. 2
      apps/explorer/lib/explorer/application.ex
  3. 4
      apps/explorer_web/config/config.exs
  4. 2
      apps/explorer_web/lib/explorer_web/application.ex
  5. 12
      apps/explorer_web/test/explorer_web/forms/transaction_form_test.exs

@ -20,7 +20,7 @@
# #
# You can give explicit globs or simply directories. # You can give explicit globs or simply directories.
# In the latter case `**/*.{ex,exs}` will be used. # In the latter case `**/*.{ex,exs}` will be used.
# #
included: ["lib/", "src/", "web/", "apps/*/lib/**/*.{ex,exs}"], included: ["lib/", "src/", "web/", "apps/*/lib/**/*.{ex,exs}"],
excluded: [~r"/_build/", ~r"/deps/", ~r"/node_modules/"] excluded: [~r"/_build/", ~r"/deps/", ~r"/node_modules/"]
}, },
@ -74,7 +74,6 @@
# #
{Credo.Check.Design.TagTODO, exit_status: 2}, {Credo.Check.Design.TagTODO, exit_status: 2},
{Credo.Check.Design.TagFIXME}, {Credo.Check.Design.TagFIXME},
{Credo.Check.Readability.FunctionNames}, {Credo.Check.Readability.FunctionNames},
{Credo.Check.Readability.LargeNumbers}, {Credo.Check.Readability.LargeNumbers},
{Credo.Check.Readability.MaxLineLength, priority: :low, max_length: 100}, {Credo.Check.Readability.MaxLineLength, priority: :low, max_length: 100},
@ -92,7 +91,6 @@
{Credo.Check.Readability.VariableNames}, {Credo.Check.Readability.VariableNames},
{Credo.Check.Readability.Semicolons}, {Credo.Check.Readability.Semicolons},
{Credo.Check.Readability.SpaceAfterCommas}, {Credo.Check.Readability.SpaceAfterCommas},
{Credo.Check.Refactor.DoubleBooleanNegation}, {Credo.Check.Refactor.DoubleBooleanNegation},
{Credo.Check.Refactor.CondStatements}, {Credo.Check.Refactor.CondStatements},
{Credo.Check.Refactor.CyclomaticComplexity}, {Credo.Check.Refactor.CyclomaticComplexity},
@ -104,7 +102,6 @@
{Credo.Check.Refactor.Nesting}, {Credo.Check.Refactor.Nesting},
{Credo.Check.Refactor.PipeChainStart}, {Credo.Check.Refactor.PipeChainStart},
{Credo.Check.Refactor.UnlessWithElse}, {Credo.Check.Refactor.UnlessWithElse},
{Credo.Check.Warning.BoolOperationOnSameValues}, {Credo.Check.Warning.BoolOperationOnSameValues},
{Credo.Check.Warning.ExpensiveEmptyEnumCheck}, {Credo.Check.Warning.ExpensiveEmptyEnumCheck},
{Credo.Check.Warning.IExPry}, {Credo.Check.Warning.IExPry},
@ -128,7 +125,7 @@
{Credo.Check.Refactor.AppendSingleItem}, {Credo.Check.Refactor.AppendSingleItem},
{Credo.Check.Refactor.VariableRebinding}, {Credo.Check.Refactor.VariableRebinding},
{Credo.Check.Warning.MapGetUnsafePass}, {Credo.Check.Warning.MapGetUnsafePass},
{Credo.Check.Consistency.MultiAliasImportRequireUse}, {Credo.Check.Consistency.MultiAliasImportRequireUse}
# Custom checks can be created using `mix credo.gen.check`. # Custom checks can be created using `mix credo.gen.check`.
# #

@ -31,7 +31,7 @@ defmodule Explorer.Application do
import Supervisor.Spec import Supervisor.Spec
[ [
supervisor(Explorer.Repo, []), supervisor(Explorer.Repo, [])
] ]
end end
end end

@ -7,8 +7,8 @@ use Mix.Config
# General application configuration # General application configuration
config :explorer_web, config :explorer_web,
namespace: ExplorerWeb, namespace: ExplorerWeb,
ecto_repos: [Explorer.Repo] ecto_repos: [Explorer.Repo]
# Configures gettext # Configures gettext
config :explorer_web, ExplorerWeb.Gettext, locales: ~w(en), default_locale: "en" config :explorer_web, ExplorerWeb.Gettext, locales: ~w(en), default_locale: "en"

@ -13,7 +13,7 @@ defmodule ExplorerWeb.Application do
# Define workers and child supervisors to be supervised # Define workers and child supervisors to be supervised
children = [ children = [
# Start the endpoint when the application starts # Start the endpoint when the application starts
supervisor(Endpoint, []), supervisor(Endpoint, [])
# Start your own worker by calling: PoaexpWeb.Worker.start_link(arg1, arg2, arg3) # Start your own worker by calling: PoaexpWeb.Worker.start_link(arg1, arg2, arg3)
# worker(PoaexpWeb.Worker, [arg1, arg2, arg3]), # worker(PoaexpWeb.Worker, [arg1, arg2, arg3]),
] ]

@ -31,7 +31,8 @@ defmodule Explorer.TransactionFormTest do
insert(:receipt, status: 1, transaction: transaction) insert(:receipt, status: 1, transaction: transaction)
form = form =
transaction |> Repo.preload([:block, :to_address, :from_address, :receipt]) transaction
|> Repo.preload([:block, :to_address, :from_address, :receipt])
|> TransactionForm.build() |> TransactionForm.build()
formatted_timestamp = block.timestamp |> Timex.format!("%b-%d-%Y %H:%M:%S %p %Z", :strftime) formatted_timestamp = block.timestamp |> Timex.format!("%b-%d-%Y %H:%M:%S %p %Z", :strftime)
@ -82,7 +83,8 @@ defmodule Explorer.TransactionFormTest do
insert(:receipt, status: 0, gas_used: 100, transaction: transaction) insert(:receipt, status: 0, gas_used: 100, transaction: transaction)
form = form =
transaction |> Repo.preload([:block, :to_address, :from_address, :receipt]) transaction
|> Repo.preload([:block, :to_address, :from_address, :receipt])
|> TransactionForm.build() |> TransactionForm.build()
formatted_timestamp = block.timestamp |> Timex.format!("%b-%d-%Y %H:%M:%S %p %Z", :strftime) formatted_timestamp = block.timestamp |> Timex.format!("%b-%d-%Y %H:%M:%S %p %Z", :strftime)
@ -133,7 +135,8 @@ defmodule Explorer.TransactionFormTest do
insert(:receipt, status: 0, gas_used: 555, transaction: transaction) insert(:receipt, status: 0, gas_used: 555, transaction: transaction)
form = form =
transaction |> Repo.preload([:block, :to_address, :from_address, :receipt]) transaction
|> Repo.preload([:block, :to_address, :from_address, :receipt])
|> TransactionForm.build() |> TransactionForm.build()
formatted_timestamp = block.timestamp |> Timex.format!("%b-%d-%Y %H:%M:%S %p %Z", :strftime) formatted_timestamp = block.timestamp |> Timex.format!("%b-%d-%Y %H:%M:%S %p %Z", :strftime)
@ -293,7 +296,8 @@ defmodule Explorer.TransactionFormTest do
insert(:receipt, status: 0, gas_used: 555, transaction: transaction) insert(:receipt, status: 0, gas_used: 555, transaction: transaction)
form = form =
transaction |> Repo.preload([:block, :to_address, :from_address, :receipt]) transaction
|> Repo.preload([:block, :to_address, :from_address, :receipt])
|> TransactionForm.build_and_merge() |> TransactionForm.build_and_merge()
assert form.hash == "0xkittenpower" assert form.hash == "0xkittenpower"

Loading…
Cancel
Save