Skip to content

Commit fbcb51a

Browse files
authored
Merge pull request #68 from garazdawi/master
Update EEPs have more consistent header contents
2 parents 4e59b2b + d0a3421 commit fbcb51a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+147
-103
lines changed

.github/workflows/action.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,20 @@ jobs:
1212
name: markdownlint
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
16-
- uses: DavidAnson/markdownlint-cli2-action@v14
15+
- uses: actions/checkout@v4
16+
- uses: DavidAnson/markdownlint-cli2-action@v17
1717
with:
1818
config: 'eep.markdownlint.json'
1919
globs: |
2020
README.md
2121
eeps/*.md
22+
- name: Build html using Gruber MD
23+
run: |
24+
./build.pl
25+
## Check for warnings by build.pl
26+
if grep '<h2>Warnings</h2>' > /dev/null; then
27+
exit 1
28+
fi
2229
- name: Deploy on erlang.org
2330
if: github.ref == 'refs/heads/master'
2431
env:

eep-index.pl

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
'Draft' => '',
4444
'Accepted' => 'A',
4545
'Rejected' => 'R',
46-
'Withdrawn' => 'W',
46+
'Replaced' => 'P',
4747
'Deferred' => 'D',
4848
'Final' => 'F',
4949
);
@@ -164,7 +164,7 @@ sub set_author {
164164
}
165165

166166
sub set_status {
167-
m|^ ([^/]*) (/? [^\s]*) \s* (.*)|x;
167+
m|^ ([^/]*) (/? [^\s]*) \s* ([^;]*)|x;
168168
my ($status, $tag, $desc) = ($1, $2, $3);
169169
my $s = $status_map{lc $status};
170170
unless (defined $s) {
@@ -196,7 +196,7 @@ sub set_type {
196196
}
197197

198198
# Mapping of EEP header tag to handler set_* function
199-
my %key =
199+
my %set =
200200
('eep' => \&set_eep,
201201
'title' => \&set_title,
202202
'version' => 0,
@@ -214,14 +214,43 @@ sub set_type {
214214
'replaced-by' => 0,
215215
);
216216

217+
sub check_erlang_version {
218+
my $version = $_;
219+
if (defined($version)) {
220+
push @warnings, "File $file: 'version: $version' illegal!"
221+
unless $version =~ /OTP_R[0-9]+[AB]([-][0-9])?/ || $version =~ /OTP-([0-9]+)[.]/;
222+
} elsif ($status{$file} =~ /^F\//) {
223+
push @warnings, "File $file: 'version: EEPs in status Final must have an Erlang-Version!";
224+
}
225+
}
226+
227+
# Mapping of EEP header tag to handler check_* function
228+
my %check =
229+
('eep' => 0,
230+
'title' => 0,
231+
'version' => 0,
232+
'last-modified' => 0,
233+
'author' => 0,
234+
'discussions-to' => 0,
235+
'status' => 0,
236+
'type' => 0,
237+
'content-type' => 0,
238+
'requires' => 0,
239+
'created' => 0,
240+
'erlang-version' => \&check_erlang_version,
241+
'post-history' => 0,
242+
'replaces' => 0,
243+
'replaced-by' => 0,
244+
);
245+
217246
sub store_key {
218247
my ($hash, $key, $value) = @_;
219-
unless (defined $key{$key}) {
248+
unless (defined $set{$key}) {
220249
push
221250
@warnings,
222251
"File $file: '$key:' unknown header - file skipped!";
223252
}
224-
if ($key{$key}) {
253+
if ($set{$key} || $check{$key}) {
225254
if (defined $$hash{$key}) {
226255
push
227256
@warnings,
@@ -286,8 +315,8 @@ sub store_key {
286315
} elsif ($line =~ m|^\s*$|) { # blank line
287316
# end of headers - process them all
288317
next LINE unless defined($hdr{'eep'}); # still missing?
289-
foreach (keys %key) {
290-
if ($key{$_} and !(defined $hdr{$_})) {
318+
foreach (keys %set) {
319+
if ($set{$_} and !(defined $hdr{$_})) {
291320
push
292321
@warnings,
293322
"File $file: '$_:' missing header - file skipped!";
@@ -296,8 +325,14 @@ sub store_key {
296325
}
297326
# call handler for all headers
298327
while (($key, $_) = each %hdr) {
299-
&{$key{$key}};
328+
&{$set{$key}} if $set{$key};
300329
}
330+
331+
# call checks for all headers
332+
while (($key, $_) = each %hdr) {
333+
&{$check{$key}} if $check{$key};
334+
}
335+
301336
last LINE;
302337
} else {
303338
push
@@ -369,7 +404,7 @@ sub table {
369404
#
370405
if (@warnings) {
371406
print "${lf}${lf}${lf}----${lf}Warnings${lf}--------${lf}";
372-
foreach (@warnings) {
407+
foreach (sort @warnings) {
373408
print " $_";
374409
}
375410
}

eeps/eep-0001.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,9 @@ versions of the EEP are posted to erlang-questions. Both headers
272272
should be in dd-mmm-yyyy format, e.g. 14-Aug-2009.
273273

274274
Standards Track EEPs must have a Erlang-Version header which indicates
275-
the version of Erlang that the feature will be released with. Process
276-
EEPs do not need a Erlang-Version header.
275+
the version of Erlang that the feature will or has be released with.
276+
Process EEPs do not need a Erlang-Version header. The version must be
277+
in the same format as the git tag scheme of Erlang/OTP project.
277278

278279
EEPs may have a Requires header, indicating the EEP numbers that this
279280
EEP depends on..

eeps/eep-0004.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Status: Final/R12B-0 Proposal is implemented in OTP release R12B-0
33
Type: Standards Track
44
Created: 10-Aug-2007
5-
Erlang-Version: R12B-0
5+
Erlang-Version: OTP_R12B-0
66
Post-History:
77
****
88
EEP 4: New BIFs for bit-level binaries (bit strings)

eeps/eep-0005.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Status: Draft
44
Type: Standards Track
55
Created: 10-Aug-2007
6-
Erlang-Version: R12B-0
6+
Erlang-Version: OTP_R12B-0
77
Post-History:
88
****
99
EEP 5: More Versatile Encapsulation with `export_to`

eeps/eep-0006.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Status: Final/R12B-0 Proposal is implemented in OTP release R12B-0
33
Type: Standards Track
44
Created: 10-Aug-2007
5-
Erlang-Version: R12B-0
5+
Erlang-Version: OTP_R12B-0
66
Post-History:
77
****
88
EEP 6: New BIFs for tuple and binary sizes

eeps/eep-0007.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Status: Rejected
33
Type: Standards Track
44
Created: 3-Sep-2007
5-
Erlang-Version: R12B
5+
Erlang-Version: OTP_R12B
66
Post-History:
77
****
88
EEP 7: Foreign Function Interface (FFI)

eeps/eep-0008.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Status: Final/R13B03 Proposal documented and implemented in OTP R13B03
44
Type: Standards Track
55
Created: 2-Dec-2007
6-
Erlang-Version: R12B
6+
Erlang-Version: OTP_R12B
77
Post-History:
88
****
99
EEP 8: Types and function specifications

eeps/eep-0009.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Status: Final/R-34 Replaced with EEP-11 and EEP-31 except `binary_string` which is part of a new `string` implementation
33
Type: Standards Track
44
Created: 28-Dec-2007
5-
Erlang-Version: R12B-2
5+
Erlang-Version: OTP_R12B-2
66
Post-History:
77
****
88
EEP 9: Library for working with binaries

eeps/eep-0010.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Status: Draft
33
Type: Standards Track
44
Created: 07-may-2008
5-
Erlang-Version: R12B-4
5+
Erlang-Version: OTP_R12B-4
66
Post-History: 01-jan-1970
77
****
88
EEP 10: Representing Unicode characters in Erlang

0 commit comments

Comments
 (0)