From 08597299fb63689cda8f8cd58f223f80233371b2 Mon Sep 17 00:00:00 2001 From: Diogo Dourado <41040569+dcdourado@users.noreply.github.com> Date: Fri, 21 May 2021 11:33:36 -0300 Subject: [PATCH 1/4] fix: remove halt-exit-status arg from main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 28fd5aa..355354a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -119,7 +119,7 @@ jobs: mix dialyzer --plt - name: Run dialyzer - run: mix dialyzer --no-check --halt-exit-status + run: mix dialyzer --no-check tests: name: Tests From 51be65728f44fbdbd557e792969ef45febb02485 Mon Sep 17 00:00:00 2001 From: Diogo Dourado <41040569+dcdourado@users.noreply.github.com> Date: Fri, 21 May 2021 11:49:58 -0300 Subject: [PATCH 2/4] fix: set correct name to ignore_warnings on mix.exs --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.exs b/mix.exs index 0c60ada..cbdb709 100644 --- a/mix.exs +++ b/mix.exs @@ -70,7 +70,7 @@ defmodule WatcherEx.MixProject do plt_add_apps: [:ex_unit], plt_core_path: "dialyzer/plts/", plt_file: {:no_warn, "dialyzer/plts/watcher_ex.plt"}, - ignore_warnings: "dialyzer.ignore-warnings" + ignore_warnings: ".dialyzer_ignore.exs" ] end From ef151fe53fa92b5a75945c41788270dc4c39ebb8 Mon Sep 17 00:00:00 2001 From: Diogo Dourado Date: Fri, 21 May 2021 12:53:29 -0300 Subject: [PATCH 3/4] chore: use lib default file name --- .dialyzer_ignore.exs => dialyzer.ignore-warnings | 0 mix.exs | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename .dialyzer_ignore.exs => dialyzer.ignore-warnings (100%) diff --git a/.dialyzer_ignore.exs b/dialyzer.ignore-warnings similarity index 100% rename from .dialyzer_ignore.exs rename to dialyzer.ignore-warnings diff --git a/mix.exs b/mix.exs index cbdb709..0c60ada 100644 --- a/mix.exs +++ b/mix.exs @@ -70,7 +70,7 @@ defmodule WatcherEx.MixProject do plt_add_apps: [:ex_unit], plt_core_path: "dialyzer/plts/", plt_file: {:no_warn, "dialyzer/plts/watcher_ex.plt"}, - ignore_warnings: ".dialyzer_ignore.exs" + ignore_warnings: "dialyzer.ignore-warnings" ] end From e7c6950be76ae62ba1f27dd6c699bf12137fb857 Mon Sep 17 00:00:00 2001 From: Diogo Dourado Date: Fri, 21 May 2021 13:59:29 -0300 Subject: [PATCH 4/4] fix: some dialyze errors --- .../lib/credentials/schemas/password.ex | 4 ++-- apps/rest_api/lib/plugs/tracker.ex | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/resource_manager/lib/credentials/schemas/password.ex b/apps/resource_manager/lib/credentials/schemas/password.ex index 38bbbe0..a88dba7 100644 --- a/apps/resource_manager/lib/credentials/schemas/password.ex +++ b/apps/resource_manager/lib/credentials/schemas/password.ex @@ -26,8 +26,8 @@ defmodule ResourceManager.Credentials.Schemas.Password do password_hash: String.t(), algorithm: String.t(), salt: integer(), - inserted_at: Datetime.t(), - updated_at: Datetime.t() + inserted_at: DateTime.t(), + updated_at: DateTime.t() } # Changeset validation arguments diff --git a/apps/rest_api/lib/plugs/tracker.ex b/apps/rest_api/lib/plugs/tracker.ex index e1ac57d..020d207 100644 --- a/apps/rest_api/lib/plugs/tracker.ex +++ b/apps/rest_api/lib/plugs/tracker.ex @@ -14,11 +14,11 @@ defmodule RestAPI.Plugs.Tracker do @impl true def call(%Plug.Conn{} = conn, _opts) do - traking_data = %{ - "ip_address" => get_remote_ip(conn), - "user_agent" => get_user_agent(conn), - "request_id" => get_request_id(conn) - } + traking_data = [ + ip_address: get_remote_ip(conn), + user_agent: get_user_agent(conn), + request_id: get_request_id(conn) + ] Logger.metadata(traking_data)