You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2021/05/17 17:55:29 UTC

[GitHub] [couchdb] jaydoane commented on a change in pull request #3568: Reformat src files with erlfmt

jaydoane commented on a change in pull request #3568:
URL: https://github.com/apache/couchdb/pull/3568#discussion_r633736596



##########
File path: src/aegis/src/aegis.erl
##########
@@ -33,50 +31,47 @@ init_db(#{} = Db, Options) ->
         is_encrypted => aegis_server:init_db(Db, Options)
     }.
 
-
 open_db(#{} = Db) ->
     Db#{
         is_encrypted => aegis_server:open_db(Db)
     }.
 
-
 get_db_info(#{is_encrypted := IsEncrypted} = Db) ->
-    KeyManagerInfo = case erlang:function_exported(?AEGIS_KEY_MANAGER, get_db_info, 1) of
-        true ->
-            ?AEGIS_KEY_MANAGER:get_db_info(Db);
-        false ->
-            []
-    end,
+    KeyManagerInfo =
+        case erlang:function_exported(?AEGIS_KEY_MANAGER, get_db_info, 1) of
+            true ->
+                ?AEGIS_KEY_MANAGER:get_db_info(Db);
+            false ->
+                []
+        end,
     [{enabled, IsEncrypted}, {key_manager, {KeyManagerInfo}}].
 
-
 encrypt(#{} = _Db, _Key, <<>>) ->
     <<>>;
-
 encrypt(#{is_encrypted := false}, _Key, Value) when is_binary(Value) ->
     Value;
-
-encrypt(#{is_encrypted := true} = Db, Key, Value)
-        when is_binary(Key), is_binary(Value) ->
+encrypt(#{is_encrypted := true} = Db, Key, Value) when
+    is_binary(Key), is_binary(Value)
+->

Review comment:
       Yikes to this as well.

##########
File path: src/aegis/src/aegis.erl
##########
@@ -33,50 +31,47 @@ init_db(#{} = Db, Options) ->
         is_encrypted => aegis_server:init_db(Db, Options)
     }.
 
-
 open_db(#{} = Db) ->
     Db#{
         is_encrypted => aegis_server:open_db(Db)
     }.
 
-
 get_db_info(#{is_encrypted := IsEncrypted} = Db) ->
-    KeyManagerInfo = case erlang:function_exported(?AEGIS_KEY_MANAGER, get_db_info, 1) of
-        true ->
-            ?AEGIS_KEY_MANAGER:get_db_info(Db);
-        false ->
-            []
-    end,
+    KeyManagerInfo =
+        case erlang:function_exported(?AEGIS_KEY_MANAGER, get_db_info, 1) of

Review comment:
       Wow, I really don't love this format change :(




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org