-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow erlfmt:ignore to be used in addition to erlfmt-ignore
Summary: This puts erlfmt in line with other tools that use the format `toolname:ignore` to disable warnings, and makes it easier for developers to "guess" the correct incantation
- Loading branch information
1 parent
81b191d
commit 6a5651e
Showing
11 changed files
with
261 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
-module(ignore_format_many_old). | ||
|
||
%%% erlfmt-ignore-begin | ||
-define(DELTA_MATRIX, [ | ||
[0, 0, 0, 0, 0, 0], | ||
[0, -16, 0, 0, 0, 0], | ||
[0, 0, 15, 0, 0, 0], | ||
[0, 0, 0, 6, 0, 0], | ||
[0, -16, 0, 0, -14, 0], | ||
[0, 0, 15, 0, 0, 0] | ||
]). | ||
-define(ALSO_IGNORED, [ 1, 2, 3]). | ||
|
||
%%% erlfmt-ignore-end | ||
-define(DELTA_MATRIX_FORMATTED, [ | ||
[0, 0, 0, 0, 0, 0], | ||
[0, -16, 0, 0, 0, 0], | ||
[0, 0, 15, 0, 0, 0], | ||
[0, 0, 0, 6, 0, 0], | ||
[0, -16, 0, 0, -14, 0], | ||
[0, 0, 15, 0, 0, 0] | ||
]). | ||
|
||
%% some comment | ||
%%erlfmt-ignore % | ||
%% another comment | ||
gen_part_decode_funcs({constructed,bif},TypeName, | ||
{_Name,parts,Tag,_Type}) -> | ||
emit([" case Data of",nl, | ||
" L when is_list(L) ->",nl, | ||
" 'dec_",TypeName,"'(lists:map(fun(X) -> element(1, ", | ||
{call,ber,ber_decode_erlang,["X"]},") end, L),",{asis,Tag},");",nl, | ||
" _ ->",nl, | ||
" [Res] = 'dec_",TypeName,"'([Data],",{asis,Tag},"),",nl, | ||
" Res",nl, | ||
" end"]). | ||
|
||
% erlfmt-ignore-begin I like the comments next to the statement | ||
f() -> ok. % this is ok | ||
g() -> ok. % this is also ok | ||
% erlfmt-ignore-end I'm done with this style | ||
|
||
h() -> ok. % blah | ||
|
||
%% TODO write emit | ||
emit(S) -> ok. |
Oops, something went wrong.