From 8a697476a7c24ab7483a67e093792ba534f2c6a5 Mon Sep 17 00:00:00 2001 From: Adriano Mitre Date: Wed, 28 Oct 2020 21:41:06 -0300 Subject: [PATCH] add --strict to credo and ensure conformity --- .github/workflows/main.yml | 5 +++-- lib/norm/core/all_of.ex | 1 - test/norm/contract_test.exs | 2 +- test/norm/core/delegate_test.exs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f3c807d..1dd34d3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: - run: mix deps.get - run: mix format --check-formatted - run: mix compile --warnings-as-errors - - run: mix credo + - run: mix credo --all --strict test: name: Test @@ -53,7 +53,8 @@ jobs: elixir-version: ${{matrix.elixir}} - run: mix deps.get --only test - - run: mix test --color 2>/tmp/tests.stderr + - name: Run mix test + run: mix test --color 2>/tmp/tests.stderr - name: Make sure tests do not have warnings run: "! grep -v 'warning: ' /tmp/tests.stderr" if: matrix.warnings_as_errors diff --git a/lib/norm/core/all_of.ex b/lib/norm/core/all_of.ex index cd5f75c..b3636f5 100644 --- a/lib/norm/core/all_of.ex +++ b/lib/norm/core/all_of.ex @@ -25,4 +25,3 @@ defmodule Norm.Core.AllOf do end end end - diff --git a/test/norm/contract_test.exs b/test/norm/contract_test.exs index 4004a07..e7eb597 100644 --- a/test/norm/contract_test.exs +++ b/test/norm/contract_test.exs @@ -94,7 +94,7 @@ defmodule Norm.ContractTest do defmodule Reflection do use Norm - def int(), do: spec(is_integer()) + def int, do: spec(is_integer()) @contract foo(a :: int(), int()) :: int() def foo(a, b), do: a + b diff --git a/test/norm/core/delegate_test.exs b/test/norm/core/delegate_test.exs index ae2c5a8..bbf8553 100644 --- a/test/norm/core/delegate_test.exs +++ b/test/norm/core/delegate_test.exs @@ -2,7 +2,7 @@ defmodule Norm.Core.DelegateTest do use Norm.Case, async: true defmodule TreeTest do - def spec() do + def spec do schema(%{ "value" => spec(is_integer()), "left" => delegate(&TreeTest.spec/0),