Skip to content

Commit 81c7238

Browse files
authored
Linter and compiler cleanups and v8 RC5 (#269)
* Remove unused linter flag * Enable compiler flag and fix docs * Prepare v8 RC5
1 parent f9666ab commit 81c7238

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## main
99

10+
## v8.0.0-rc5
11+
1012
- Documentation improvements (#267)
1113
- Separate edns payload size over UDP as a configurable pipe (#267)
1214
- Extend pipelines with halt and secondary pipelines (#268)

rebar.config

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
warn_obsolete_guard,
1313
strict_validation,
1414
warn_export_vars,
15-
warn_exported_vars
15+
warn_exported_vars,
16+
warn_missing_spec
1617
% warn_untyped_record
17-
% warn_missing_spec,
1818
% warn_missing_doc
1919
]}.
2020

@@ -162,8 +162,7 @@
162162
{elvis_style, state_record_and_type, disable},
163163
{elvis_style, private_data_types, disable}
164164
],
165-
ruleset => erl_files_strict,
166-
ignore => ['DNS-ASN1']
165+
ruleset => erl_files_strict
167166
},
168167
#{
169168
dirs => ["include"],

src/listeners/erldns_proto_udp_acceptor_sup.erl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
-module(erldns_proto_udp_acceptor_sup).
2+
-moduledoc false.
23

34
-behaviour(supervisor).
45

src/pipes/erldns_axfr.erl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ AXFR zone transfers are not currently implemented. The current "implementation"
2828
-export([call/2]).
2929
-export([is_enabled/2]).
3030

31+
-doc "`c:erldns_pipeline:call/2` callback.".
3132
-spec call(dns:message(), erldns_pipeline:opts()) -> dns:message().
3233
call(#dns_message{questions = Questions} = Msg, _) ->
3334
%% If the message is an AXFR request then append the SOA record.
@@ -38,18 +39,17 @@ call(#dns_message{questions = Questions} = Msg, _) ->
3839
Msg
3940
end.
4041

41-
%% Determine if AXFR is enabled for the given request host.
42+
-doc "Determine if AXFR is enabled for the given request host.".
43+
-spec is_enabled(_, _) -> boolean().
4244
is_enabled(Host, Metadata) ->
43-
MatchingMetadata =
44-
lists:filter(
45-
fun(MetadataRow) ->
46-
[_Id, _DomainId, Kind, Content] = MetadataRow,
47-
{ok, AllowedAddress} = inet_parse:address(binary_to_list(Content)),
48-
AllowedAddress =:= Host andalso Kind =:= <<"axfr">>
49-
end,
50-
Metadata
51-
),
52-
length(MatchingMetadata) > 0.
45+
lists:any(
46+
fun(MetadataRow) ->
47+
[_Id, _DomainId, Kind, Content] = MetadataRow,
48+
{ok, AllowedAddress} = inet_parse:address(binary_to_list(Content)),
49+
AllowedAddress =:= Host andalso Kind =:= <<"axfr">>
50+
end,
51+
Metadata
52+
).
5353

5454
append_soa(Message, []) ->
5555
Message;

0 commit comments

Comments
 (0)