Skip to content

Commit

Permalink
Merge pull request #4836 from apache/erlfmt-1.3.0
Browse files Browse the repository at this point in the history
update erlfmt to 1.3.0 and fix issues
  • Loading branch information
rnewson committed Nov 9, 2023
2 parents be6124a + ce92dd5 commit 484847d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ basename=`basename $0`
PACKAGE_AUTHOR_NAME="The Apache Software Foundation"

REBAR3_BRANCH="3.21.0"
ERLFMT_VERSION="v1.3.0"

# TEST=0
WITH_PROPER="true"
Expand Down Expand Up @@ -334,7 +335,7 @@ install_local_rebar3() {
install_local_erlfmt() {
if [ ! -x "${rootdir}/bin/erlfmt" ]; then
if [ ! -d "${rootdir}/src/erlfmt" ]; then
git clone --depth 1 https://github.com/WhatsApp/erlfmt.git ${rootdir}/src/erlfmt
git clone --depth 1 --branch "${ERLFMT_VERSION}" https://github.com/WhatsApp/erlfmt.git ${rootdir}/src/erlfmt
fi
cd "${rootdir}"/src/erlfmt
${REBAR3} as release escriptize
Expand Down
8 changes: 4 additions & 4 deletions src/mango/src/mango_cursor_view.erl
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@
#{
selector => selector(),
fields => fields(),
covering_index => maybe(#idx{})
covering_index => 'maybe'(#idx{})
}.

-spec viewcbargs_new(Selector, Fields, CoveringIndex) -> ViewCBArgs when
Selector :: selector(),
Fields :: fields(),
CoveringIndex :: maybe(#idx{}),
CoveringIndex :: 'maybe'(#idx{}),
ViewCBArgs :: viewcbargs().
viewcbargs_new(Selector, Fields, CoveringIndex) ->
#{
Expand All @@ -67,7 +67,7 @@ viewcbargs_new(Selector, Fields, CoveringIndex) ->
covering_index => CoveringIndex
}.

-spec viewcbargs_get(Key, Args) -> maybe(term()) when
-spec viewcbargs_get(Key, Args) -> 'maybe'(term()) when
Key :: selector | fields | covering_index,
Args :: viewcbargs().
viewcbargs_get(selector, Args) when is_map(Args) ->
Expand Down Expand Up @@ -426,7 +426,7 @@ view_cb(ok, ddoc_updated) ->
-spec match_and_extract_doc(Doc, Selector, Fields) -> Result when
Doc :: ejson(),
Selector :: selector(),
Fields :: maybe(fields()),
Fields :: 'maybe'(fields()),
Result :: {match, term()} | {no_match, undefined}.
match_and_extract_doc(Doc, Selector, Fields) ->
case mango_selector:match(Selector, Doc) of
Expand Down

0 comments on commit 484847d

Please sign in to comment.