travis: enable markdownlint checks

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/11739)
This commit is contained in:
Rich Salz 2020-05-07 13:42:14 +02:00 committed by Dr. Matthias St. Pierre
parent c7fa92979c
commit 4ef0ddc9d8
5 changed files with 53 additions and 26 deletions

View File

@ -135,7 +135,7 @@ jobs:
script: true
- os: linux
compiler: gcc
env: CONFIGURE_TARGET="linux-generic32" CONFIG_OPTS="--strict-warnings no-shared no-dso no-pic no-aria no-async no-autoload-config no-blake2 no-bf no-camellia no-cast no-chacha no-cmac no-cms no-cmp no-comp no-ct no-des no-dgram no-dh no-dsa no-dtls no-ec2m no-engine no-filenames no-gost no-idea no-ktls no-mdc2 no-md4 no-multiblock no-nextprotoneg no-ocsp no-ocb no-poly1305 no-psk no-rc2 no-rc4 no-rmd160 no-seed no-siphash no-siv no-sm2 no-sm3 no-sm4 no-srp no-srtp no-ssl3 no-ssl3-method no-ts no-ui-console no-whirlpool no-asm -DOPENSSL_NO_SECURE_MEMORY -DOPENSSL_SMALL_FOOTPRINT"
env: CONFIGURE_TARGET="linux-generic32" MARKDOWNLINT="yes" CONFIG_OPTS="--strict-warnings no-shared no-dso no-pic no-aria no-async no-autoload-config no-blake2 no-bf no-camellia no-cast no-chacha no-cmac no-cms no-cmp no-comp no-ct no-des no-dgram no-dh no-dsa no-dtls no-ec2m no-engine no-filenames no-gost no-idea no-ktls no-mdc2 no-md4 no-multiblock no-nextprotoneg no-ocsp no-ocb no-poly1305 no-psk no-rc2 no-rc4 no-rmd160 no-seed no-siphash no-siv no-sm2 no-sm3 no-sm4 no-srp no-srtp no-ssl3 no-ssl3-method no-ts no-ui-console no-whirlpool no-asm -DOPENSSL_NO_SECURE_MEMORY -DOPENSSL_SMALL_FOOTPRINT"
before_script:
@ -204,6 +204,12 @@ script:
echo -e '\052\052 FAILED -- MAKE DOC-NITS';
travis_terminate 1;
fi
- if test -n "$MARKDOWNLINT" ; then
echo -e "====START MARKDOWNLINT====";
gem install mdl || travis_terminate 1;
mdl -s util/markdownlint.rb . || travis_terminate 1;
echo -e "====END MARKDOWNLINT====";
fi
- if ! $make2; then
echo -e '\052\052 FAILED -- MAKE';
travis_terminate 1;

View File

@ -18,11 +18,11 @@ if (/^### Changes between (\S+) and (\S+) \[xx XXX xxxx\]/
# If this is a pre-release, we do nothing
if ($RELEASE !~ /^\d+\.\d+\.\d+-(?:alpha|beta)/) {
$_ = <<_____
### Changes between $v2 and $RELEASE_TEXT [xx XXX xxxx] ###
### Changes between $v2 and $RELEASE_TEXT [xx XXX xxxx]
*
### Changes between $v1 and $v2 [$PREV_RELEASE_DATE] ###
### Changes between $v1 and $v2 [$PREV_RELEASE_DATE]
_____
}
}

View File

@ -18,11 +18,11 @@ if (/^### Major changes between OpenSSL (\S+) and OpenSSL (\S+) \[under developm
# If this is a pre-release, we do nothing
if ($RELEASE !~ /^\d+\.\d+\.\d+-(?:alpha|beta)/) {
$_ = <<_____
### Major changes between OpenSSL $v2 and OpenSSL $RELEASE_TEXT [under development] ###
### Major changes between OpenSSL $v2 and OpenSSL $RELEASE_TEXT [under development]
*
### Major changes between OpenSSL $v1 and OpenSSL $v2 [$PREV_RELEASE_DATE] ###
### Major changes between OpenSSL $v1 and OpenSSL $v2 [$PREV_RELEASE_DATE]
_____
}
}

21
util/markdownlint.rb Normal file
View File

@ -0,0 +1,21 @@
# markdownlint style rules for OpenSSL
# See https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md
all
# Use --- and === for H1 and H2.
rule 'MD003', :style => :setext_with_atx
# Code blocks are indented
rule 'MD046', :style => :indented
# Bug in mdl, https://github.com/markdownlint/markdownlint/issues/313
exclude_rule 'MD007'
exclude_rule 'MD004' # Unordered list style TODO(fix?)
exclude_rule 'MD005' # Inconsistent indentation for list items at the same level
exclude_rule 'MD006' # Consider starting bulleted lists at the beginning of the line
exclude_rule 'MD014' # Dollar signs used before commands without showing output
exclude_rule 'MD024' # Multiple headers with the same content
exclude_rule 'MD025' # Multiple top level headers in the same document
exclude_rule 'MD029' # Ordered list item prefix
exclude_rule 'MD036' # Emphasis used instead of a header