This repository was archived by the owner on Nov 19, 2024. It is now read-only.
File tree 7 files changed +55
-8
lines changed
7 files changed +55
-8
lines changed Original file line number Diff line number Diff line change 1
- style '_checks/md_style '
2
- ignore_front_matter true
1
+ style '_checks/styles/style-rules-dev '
2
+ ignore_front_matter true
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
# This Jekyll hook runs Markdown linter (https://github.com/markdownlint/markdownlint)
2
2
# on .md files that git tracks as 'modified' ('git ls-files -m').
3
- # '_checks/md_style' sets a style (https://github.com/markdownlint/markdownlint/blob/master/docs/creating_styles.md)
3
+ # '_checks/styles/ md_style' sets a style (https://github.com/markdownlint/markdownlint/blob/master/docs/creating_styles.md)
4
4
# that is a set of rules to be applied when linting (https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md).
5
5
# '.mdlrc' sets linting configuration (https://github.com/markdownlint/markdownlint/blob/master/docs/configuration.md).
6
6
#
15
15
staged_md_files_as_a_string = staged_md_files . join ( ' ' )
16
16
report = `bin/mdl #{ staged_md_files_as_a_string } `
17
17
puts report . yellow
18
- puts 'The style is defined in _checks/md_style ' . yellow
18
+ puts 'The style is defined in _checks/styles/style-rules-dev ' . yellow
19
19
end
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ exclude_rule 'MD001'
2
+ exclude_rule 'MD002'
3
+ exclude_rule 'MD003'
4
+ exclude_rule 'MD004'
5
+ exclude_rule 'MD005'
6
+ exclude_rule 'MD006'
7
+ exclude_rule 'MD007'
8
+ exclude_rule 'MD009'
9
+ exclude_rule 'MD010'
10
+ exclude_rule 'MD011'
11
+ exclude_rule 'MD012'
12
+ exclude_rule 'MD013'
13
+ exclude_rule 'MD014'
14
+ exclude_rule 'MD018'
15
+ exclude_rule 'MD019'
16
+ exclude_rule 'MD020'
17
+ exclude_rule 'MD021'
18
+ exclude_rule 'MD022'
19
+ exclude_rule 'MD023'
20
+ exclude_rule 'MD024'
21
+ exclude_rule 'MD025'
22
+ exclude_rule 'MD026'
23
+ exclude_rule 'MD027'
24
+ exclude_rule 'MD028'
25
+ exclude_rule 'MD029'
26
+ exclude_rule 'MD030'
27
+ exclude_rule 'MD031'
28
+ exclude_rule 'MD032'
29
+ exclude_rule 'MD033'
30
+ exclude_rule 'MD034'
31
+ exclude_rule 'MD035'
32
+ exclude_rule 'MD036'
33
+ exclude_rule 'MD037'
34
+ exclude_rule 'MD038'
35
+ exclude_rule 'MD039'
36
+ exclude_rule 'MD040'
37
+ exclude_rule 'MD041'
38
+ exclude_rule 'MD046'
Original file line number Diff line number Diff line change @@ -24,6 +24,6 @@ namespace :check do
24
24
puts 'Running Markdown linter ...' . magenta
25
25
report = `bin/mdl #{ path } `
26
26
puts report . yellow
27
- puts 'The rules are defined in _checks/md_style' . magenta
27
+ puts 'The rules are defined in _checks/styles/ md_style' . magenta
28
28
end
29
29
end
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ namespace :test do
6
6
task links : %w[ build links_no_build ]
7
7
8
8
desc 'Check the existing _site for broken links on Jenkins'
9
- task : cicd do
9
+ task cicd : %w[ style ] do
10
10
puts 'Checking links with htmlproofer...' . magenta
11
11
12
12
LinkChecker . check_site
@@ -27,9 +27,9 @@ namespace :test do
27
27
# StandardError, rake will abort and won't run the convert task (https://stackoverflow.com/a/10048406).
28
28
# Wrapping task in a begin-rescue block prevent rake from aborting.
29
29
# Seems to prevent printing an error count though.
30
- rescue StandardError => msg
30
+ rescue StandardError => e
31
31
# Show how many lines contains the Markdown report
32
- puts msg . to_s . red
32
+ puts e . to_s . red
33
33
puts "To see the report, open the #{ report } file." . red
34
34
end
35
35
end
@@ -39,4 +39,13 @@ namespace :test do
39
39
puts 'Converting the link check report to HTML...' . magenta
40
40
Converter . to_html
41
41
end
42
+
43
+ desc 'Test Markdown style with mdl'
44
+ task :style do
45
+ puts 'Testing Markdown style with mdl ...' . magenta
46
+ output = `bin/mdl --style=_checks/styles/style-rules-prod --ignore-front-matter --git-recurse -- .`
47
+ puts output . yellow
48
+ abort "The Markdown linter has found #{ output . lines . count } issues" . red unless output . empty?
49
+ puts 'No issues found' . magenta
50
+ end
42
51
end
You can’t perform that action at this time.
0 commit comments