From c8b3e3a977bd8b4071e190c7c7aaa72f934af60a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Szoboszlay?= Date: Fri, 13 May 2016 23:05:23 +0200 Subject: Fix line-initial commas' indentation in type specs Inside type specs, line-initial commas shall align with open curly braces. This also applies to record definitions with type specs for the fields. For example: -type foo() :: { a :: integer() , b :: integer() }. For type specs for functions, the commas shall align with the opening parenthese. So do a closing parenthese when put on a new line. For example: -spec foo( X :: integer() , Y :: integer() ) -> integer(). This does not affect coding styles that don't put commas at the beginning of lines. --- lib/tools/emacs/test.erl.indented | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/tools/emacs/test.erl.indented') diff --git a/lib/tools/emacs/test.erl.indented b/lib/tools/emacs/test.erl.indented index 6913068133..7a1ff6a954 100644 --- a/lib/tools/emacs/test.erl.indented +++ b/lib/tools/emacs/test.erl.indented @@ -70,6 +70,9 @@ foo() -> 234, d}). +-record(record5, { a = 1 :: integer() + , b = foobar :: atom() + }). -define(MACRO_1, macro). -define(MACRO_2(_), macro). @@ -144,6 +147,12 @@ foo() -> -type t25() :: #rec3{f123 :: [t24() | 1|2|3|4|a|b|c|d| nonempty_maybe_improper_list(integer, any())]}. +-type t26() :: #rec4{ a :: integer() + , b :: any() + }. +-type t27() :: { integer() + , atom() + }. -type t99() :: {t2(),t4(),t5(),t6(),t7(),t8(),t10(),t14(), t15(),t20(),t21(), t22(),t25()}. @@ -179,6 +188,10 @@ foo() -> | {'error', {'no_process', term()} | {'no_such_group', term()}}. +-spec add( X :: integer() + , Y :: integer() + ) -> integer(). + -opaque attributes_data() :: [{'column', column()} | {'line', info_line()} | {'text', string()}] | {line(),column()}. -- cgit v1.2.3