From 4b73ca638ec8194e96b7d8199022f519b3499109 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Tue, 5 Mar 2019 06:07:21 +0100 Subject: [PATCH] =?UTF-8?q?[Credo][CI]=20Add=20readability=20as=20it?= =?UTF-8?q?=E2=80=99s=20fixed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .credo.exs | 4 +++- .gitlab-ci.yml | 2 +- lib/mix/tasks/pleroma/uploads.ex | 1 - lib/pleroma/uploaders/uploader.ex | 1 - lib/pleroma/web/nodeinfo/nodeinfo.ex | 1 - 5 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 lib/pleroma/web/nodeinfo/nodeinfo.ex diff --git a/.credo.exs b/.credo.exs index 620b4abdd..46d45d015 100644 --- a/.credo.exs +++ b/.credo.exs @@ -81,7 +81,9 @@ {Credo.Check.Readability.ParenthesesOnZeroArityDefs}, {Credo.Check.Readability.ParenthesesInCondition}, {Credo.Check.Readability.PredicateFunctionNames}, - {Credo.Check.Readability.PreferImplicitTry}, + # lanodan: I think PreferImplicitTry should be consistency, and the behaviour seems + # inconsistent, see: https://github.com/rrrene/credo/issues/224 + {Credo.Check.Readability.PreferImplicitTry, false}, {Credo.Check.Readability.RedundantBlankLines}, {Credo.Check.Readability.StringSigils}, {Credo.Check.Readability.TrailingBlankLine}, diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d5b463000..0d7f92c9e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,4 +42,4 @@ unit-testing: analysis: stage: analysis script: - - mix credo list --only=warnings,todo,fixme,consistency + - mix credo list --only=warnings,todo,fixme,consistency,readability diff --git a/lib/mix/tasks/pleroma/uploads.ex b/lib/mix/tasks/pleroma/uploads.ex index 9ca123a9b..106fcf443 100644 --- a/lib/mix/tasks/pleroma/uploads.ex +++ b/lib/mix/tasks/pleroma/uploads.ex @@ -20,7 +20,6 @@ defmodule Mix.Tasks.Pleroma.Uploads do Options: - `--delete` - delete local uploads after migrating them to the target uploader - A list of available uploaders can be seen in config.exs """ def run(["migrate_local", target_uploader | args]) do diff --git a/lib/pleroma/uploaders/uploader.ex b/lib/pleroma/uploaders/uploader.ex index ce83cbbbc..bf15389fc 100644 --- a/lib/pleroma/uploaders/uploader.ex +++ b/lib/pleroma/uploaders/uploader.ex @@ -29,7 +29,6 @@ defmodule Pleroma.Uploaders.Uploader do * `{:error, String.t}` error information if the file failed to be saved to the backend. * `:wait_callback` will wait for an http post request at `/api/pleroma/upload_callback/:upload_path` and call the uploader's `http_callback/3` method. - """ @type file_spec :: {:file | :url, String.t()} @callback put_file(Pleroma.Upload.t()) :: diff --git a/lib/pleroma/web/nodeinfo/nodeinfo.ex b/lib/pleroma/web/nodeinfo/nodeinfo.ex deleted file mode 100644 index 8b1378917..000000000 --- a/lib/pleroma/web/nodeinfo/nodeinfo.ex +++ /dev/null @@ -1 +0,0 @@ -