Commit 2f5c6025 authored by wawryk's avatar wawryk Committed by Tomasz Zawadzki
Browse files

markdownlint: add -g option to check_format and fix mdl errors



-g option using only files known to git, that allow us
to avoid errors from submodules

Also add check if mdl is installed, and gracefull info if not.

Signed-off-by: default avatarMaciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ib6e1920774ffca81e62d9abebc8d8b4548feb519
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9086


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarMonica Kenguva <monica.kenguva@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarPawel Piatek <pawelx.piatek@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 24bfe0dd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@ assignees: ''

---

# Bug report

<!--- Provide a general summary of the issue in the Title above -->

## Expected Behavior
+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@ assignees: ''

---

# CI Intermittent Failure

<!--- Provide a [test_name] where the issue occurred and brief description in the Title above. -->
<!--- Name of the test can be found by last occurrence of: -->
<!--- ************************************	-->
+13 −8
Original line number Diff line number Diff line
@@ -587,8 +587,9 @@ function check_json_rpc() {
function check_markdown_format() {
	local rc=0

	if hash mdl 2> /dev/null; then
		echo -n "Checking markdown files format..."
	mdl -s $rootdir/mdl_rules.rb . > mdl.log || true
		mdl -g -s $rootdir/mdl_rules.rb . > mdl.log || true
		if [ -s mdl.log ]; then
			echo " Errors in .md files detected:"
			cat mdl.log
@@ -597,6 +598,10 @@ function check_markdown_format() {
			echo " OK"
		fi
		rm -f mdl.log
	else
		echo "You do not have markdownlint installed so .md files not being checked!"
	fi

	return $rc
}