1
+ {
2
+ // See https://go.microsoft.com/fwlink/?LinkId=733558
3
+ // for the documentation about the tasks.json format
4
+ "version" : " 2.0.0" ,
5
+ "tasks" : [
6
+ {
7
+ "label" : " Run linter" ,
8
+ "type" : " shell" ,
9
+ "command" : " ./content-lint.sh -p '../../content/hardware/'" ,
10
+ "options" : {
11
+ "cwd" : " ${workspaceFolder}${pathSeparator}scripts${pathSeparator}validation"
12
+ },
13
+ "windows" : {
14
+ "command" : " .\\ content-lint.cmd -p '..\\ ..\\ content\\ hardware\\ '"
15
+ },
16
+ "group" : " none" ,
17
+ "presentation" : {
18
+ "reveal" : " always" ,
19
+ "panel" : " dedicated" ,
20
+ "clear" : true
21
+ },
22
+
23
+ "problemMatcher" : [{
24
+ "fileLocation" : [" relative" , " ${workspaceFolder}${pathSeparator}scripts${pathSeparator}validation" ],
25
+ "owner" : " linter" ,
26
+ "pattern" : {
27
+ "regexp" : " ^.+\\ s(WARNING|ERROR):\\ s(.*)\\ sLocation:\\ s(.*\\ .[A-Za-z]+):(\\ d+):?(\\ d*)$" ,
28
+ "severity" : 1 ,
29
+ "message" : 2 ,
30
+ "file" : 3 ,
31
+ "line" : 4 ,
32
+ "column" : 5
33
+ }
34
+ }]
35
+ },
36
+ {
37
+ "label" : " Run linter (current article)" ,
38
+ "type" : " shell" ,
39
+ "command" : " ./content-lint.sh -p '../../${relativeFile}' -c -v" ,
40
+ "options" : {
41
+ "cwd" : " ${workspaceFolder}${pathSeparator}scripts${pathSeparator}validation"
42
+ },
43
+ "windows" : {
44
+ "command" : " .\\ content-lint.cmd -p '..\\ ..\\ ${relativeFile}' -c -v"
45
+ },
46
+ "group" : " none" ,
47
+ "presentation" : {
48
+ "reveal" : " always" ,
49
+ "panel" : " dedicated" ,
50
+ "clear" : true
51
+ },
52
+ "problemMatcher" : [{
53
+ "fileLocation" : [" relative" , " ${workspaceFolder}${pathSeparator}scripts${pathSeparator}validation" ],
54
+ "owner" : " linter" ,
55
+ "pattern" : {
56
+ "regexp" : " ^.+\\ s(WARNING|ERROR):\\ s(.+)\\ sLocation:\\ s(.+\\ .[A-Za-z]+):(\\ d+):?(\\ d*)$" ,
57
+ "severity" : 1 ,
58
+ "message" : 2 ,
59
+ "file" : 3 ,
60
+ "line" : 4 ,
61
+ "column" : 5
62
+ }
63
+ }]
64
+ },
65
+ {
66
+ "label" : " Fix linter issues (current article)" ,
67
+ "type" : " shell" ,
68
+ "command" : " node './fix-issues.js' -p '../../${relativeFileDirname}'" ,
69
+ "options" : {
70
+ "cwd" : " ${workspaceFolder}${pathSeparator}scripts${pathSeparator}validation"
71
+ },
72
+ "windows" : {
73
+ "command" : " node '.\\ fix-issues.js' -p '..\\ ..\\ ${relativeFileDirname}'"
74
+ },
75
+ "group" : " none" ,
76
+ "presentation" : {
77
+ "reveal" : " always" ,
78
+ "panel" : " dedicated"
79
+ },
80
+ "problemMatcher" : []
81
+ },
82
+ {
83
+ "label" : " Fix linter issues" ,
84
+ "type" : " shell" ,
85
+ "command" : " node ./fix-issues.js -p ../../content/hardware/" ,
86
+ "options" : {
87
+ "cwd" : " ${workspaceFolder}${pathSeparator}scripts${pathSeparator}validation"
88
+ },
89
+ "windows" : {
90
+ "command" : " node .\\ fix-issues.js -p ..\\ ..\\ content\\ hardware\\ "
91
+ },
92
+ "group" : " none" ,
93
+ "presentation" : {
94
+ "reveal" : " always" ,
95
+ "panel" : " dedicated"
96
+ },
97
+ "problemMatcher" : []
98
+ },
99
+ {
100
+ "label" : " Generate all datasheets" ,
101
+ "type" : " shell" ,
102
+ "command" : " ./generate-datasheets.sh" ,
103
+ "options" : {
104
+ "cwd" : " ${workspaceFolder}${pathSeparator}scripts${pathSeparator}datasheet-generator"
105
+ },
106
+ "windows" : {
107
+ "command" : " .\\ generate-datasheets.cmd"
108
+ },
109
+ "group" : " none" ,
110
+ "presentation" : {
111
+ "reveal" : " always" ,
112
+ "panel" : " dedicated"
113
+ },
114
+ "problemMatcher" : []
115
+ },
116
+ {
117
+ "label" : " Generate datasheet (current document)" ,
118
+ "type" : " shell" ,
119
+ "command" : " ./generate-datasheets.sh '../../${relativeFileDirname}'" ,
120
+ "options" : {
121
+ "cwd" : " ${workspaceFolder}${pathSeparator}scripts${pathSeparator}datasheet-generator"
122
+ },
123
+ "windows" : {
124
+ "command" : " .\\ generate-datasheets.cmd '..\\ ..\\ ${relativeFileDirname}'"
125
+ },
126
+ "group" : " none" ,
127
+ "presentation" : {
128
+ "reveal" : " always" ,
129
+ "panel" : " dedicated"
130
+ },
131
+ "problemMatcher" : []
132
+ },
133
+ {
134
+ "label" : " Run spell check" ,
135
+ "type" : " shell" ,
136
+ "command" : " (pip install codespell > /dev/null 2>&1 || pip3 install codespell > /dev/null 2>&1) && codespell -I 'scripts${pathSeparator}resources${pathSeparator}spell-check-ignore-list.txt' --skip='*.svg,*.dxf' .${pathSeparator}content${pathSeparator}" ,
137
+ "options" : {
138
+ "cwd" : " ${workspaceFolder}"
139
+ },
140
+ "group" : " none" ,
141
+ "presentation" : {
142
+ "reveal" : " always" ,
143
+ "panel" : " shared"
144
+ },
145
+ "problemMatcher" : [{
146
+ "fileLocation" : [" relative" , " ${workspaceFolder}" ],
147
+ "owner" : " linter" ,
148
+ "pattern" : {
149
+ "regexp" : " ^\\ s*(\\ S+):(\\ d+):\\ s(.+)$" ,
150
+ "file" : 1 ,
151
+ "line" : 2 ,
152
+ "message" : 3
153
+ }
154
+ }]
155
+ },
156
+ {
157
+ "label" : " Fix misspellings" ,
158
+ "type" : " shell" ,
159
+ "command" : " (pip install codespell > /dev/null 2>&1 || pip3 install codespell > /dev/null 2>&1) && codespell -w -I 'scripts${pathSeparator}resources${pathSeparator}spell-check-ignore-list.txt' --skip='*.svg,*.dxf' .${pathSeparator}content${pathSeparator}" ,
160
+ "options" : {
161
+ "cwd" : " ${workspaceFolder}"
162
+ },
163
+ "group" : " none" ,
164
+ "presentation" : {
165
+ "reveal" : " always" ,
166
+ "panel" : " shared"
167
+ },
168
+ "problemMatcher" : []
169
+ }
170
+ ]
171
+ }
0 commit comments