File tree 3 files changed +21
-4
lines changed
3 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ spdkcsi:
45
45
@CGO_ENABLED=0 GOARCH=$(GOARCH ) GOOS=linux go build -buildvcs=false -o $(OUT_DIR ) /spdkcsi ./cmd/
46
46
47
47
# static code check, text lint
48
- lint : golangci yamllint shellcheck
48
+ lint : golangci yamllint shellcheck mdl
49
49
50
50
.PHONY : golangci
51
51
golangci : $(GOLANGCI_BIN )
@@ -76,6 +76,16 @@ shellcheck:
76
76
echo shellcheck not installed, skip test ; \
77
77
fi
78
78
79
+ .PHONY : mdl
80
+ mdl :
81
+ @echo === running mdl
82
+ @if hash mdl 2> /dev/null; then \
83
+ find ./ -name " *.md" | xargs readlink -f | xargs mdl --style scripts/ci/mdl_rules.rb; \
84
+ else \
85
+ echo Markdown linter not found, please install; \
86
+ false ; \
87
+ fi
88
+
79
89
# tests
80
90
test : mod-check unit-test
81
91
Original file line number Diff line number Diff line change @@ -106,9 +106,10 @@ function install_packages_ubuntu() {
106
106
systemctl start docker
107
107
# install static check tools only on x86 agent
108
108
if [ " $( arch) " == x86_64 ]; then
109
- apt-get install -y python3-pip
109
+ apt-get install -y python3-pip ruby
110
110
pip3 install yamllint==1.23.0 shellcheck-py==0.7.1.1
111
111
fi
112
+ gem install mdl -v 0.12.0
112
113
}
113
114
114
115
function install_packages_fedora() {
@@ -119,7 +120,8 @@ function install_packages_fedora() {
119
120
conntrack \
120
121
bind-utils \
121
122
socat \
122
- wget
123
+ wget \
124
+ ruby
123
125
if ! hash docker & > /dev/null; then
124
126
dnf remove -y docker*
125
127
dnf install -y dnf-plugins-core
@@ -132,9 +134,10 @@ function install_packages_fedora() {
132
134
133
135
# install static check tools only on x86 agent
134
136
if [ " $( arch) " == x86_64 ]; then
135
- dnf install -y python3-pip
137
+ dnf install -y python3-pip ruby
136
138
pip3 install yamllint==1.23.0 shellcheck-py==0.7.1.1
137
139
fi
140
+ gem install mdl -v 0.12.0
138
141
}
139
142
140
143
function install_golang() {
Original file line number Diff line number Diff line change
1
+ all
2
+ rule 'MD013' , :line_length => 120
3
+ rule 'MD029' , :style => "ordered"
4
+ exclude_rule 'MD031'
You can’t perform that action at this time.
0 commit comments