Land #93: Format missed files

pull/89/head
Luke Imhoff 7 years ago committed by GitHub
commit 422d1003c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      .credo.exs
  2. 7
      .formatter.exs
  3. 2
      apps/explorer/lib/explorer/application.ex
  4. 2
      apps/explorer_web/lib/explorer_web/application.ex
  5. 12
      apps/explorer_web/test/explorer_web/forms/transaction_form_test.exs

@ -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`.
# #

@ -1,5 +1,10 @@
[ [
inputs: [ inputs: [
"mix.exs", "{config,lib,test}/**/*.{ex,exs}" ".credo.exs",
".formatter.exs",
"apps/*/mix.exs",
"apps/*/{config,lib,test}/**/*.{ex,exs}",
"mix.exs",
"{config}/**/*.{ex,exs}"
] ]
] ]

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

@ -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