You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>1. If the precommit check fails, don't worry. You can also get more information by executing "make help". </p>
141
141
<p>2. For the pip installation tool, we recommend that you use venv for installation.</p>
142
-
<p>3. You can also directly submit the PR and let GitHub CI test it for you, but this will take a lot of time!</p>
142
+
<p>3. We recommend installing pre-commit through Python's virtual environment.</p>
143
+
<p>4. You can also directly submit the PR and let GitHub CI test it for you, but this will take a lot of time!</p>
143
144
</div>
144
145
145
146
<divclassName={styles.steps}>
146
147
<divclassName={styles.step}>
147
148
<spanclassName={styles.stepNumber}>1</span>
148
149
<div>
149
150
<h4>Install precommit</h4>
150
-
<p>Run pip install --user precommit</p>
151
+
<p>
152
+
Run
153
+
<code>pip install --user pre-commit</code>
154
+
</p>
151
155
</div>
152
156
</div>
153
157
<divclassName={styles.step}>
154
158
<spanclassName={styles.stepNumber}>2</span>
155
159
<div>
156
160
<h4>Install check tools</h4>
157
161
<divclassName={styles.stepNumberTips}>
158
-
<p>Markdown: npm install -g markdownlint-cli</p>
159
-
<p>Yaml: pip install --user yamllint</p>
160
-
<p>CodeSpell: pip install --user codespell</p>
161
-
<p>JavaScript: cd website &&npmlint</p>
162
+
<p>
163
+
1. Markdown:
164
+
<code>npm install -g markdownlint-cli</code>
165
+
</p>
166
+
<p>
167
+
2. Yaml:
168
+
<code>pip install --user yamllint</code>
169
+
</p>
170
+
<p>
171
+
3. CodeSpell:
172
+
<code>pip install --user codespell</code>
173
+
</p>
174
+
<p>
175
+
4. JavaScript:
176
+
<code>cd website &&npmlint</code>
177
+
</p>
178
+
<p>
179
+
5. Shell: take Mac as an example, execute
180
+
<code>brew install shellcheck</code>
181
+
</p>
162
182
</div>
163
183
</div>
164
184
</div>
165
185
<divclassName={styles.step}>
166
186
<spanclassName={styles.stepNumber}>3</span>
167
187
<div>
168
188
<h4>Install precommit to git</h4>
169
-
<p>Run pre-commit install, then pre-commit installed at .git/hooks/pre-commit</p>
189
+
<p>
190
+
Run
191
+
<code>pre-commit install</code>
192
+
, then pre-commit installed at
193
+
<code>.git/hooks/pre-commit</code>
194
+
</p>
170
195
</div>
171
196
</div>
172
197
<divclassName={styles.step}>
173
198
<spanclassName={styles.stepNumber}>4</span>
174
199
<div>
175
200
<h4>Run</h4>
176
-
<p>Run make precommit-check to check.</p>
201
+
<p>
202
+
Run
203
+
<code>make precommit-check</code>
204
+
{' '}
205
+
to check.
206
+
</p>
177
207
</div>
178
208
</div>
179
209
180
210
<hr/>
181
211
182
212
<h3>Docker/Podman</h3>
183
213
<p>From the above local running method, it can be seen that the process is very troublesome and complicated. Therefore, we have provided running methods based on Docker or Podman. There is no need to install various dependent software; all you need is a container runtime.</p>
214
+
215
+
<h4>Some Tips: </h4>
216
+
<divclassName={styles.stepNumberTips}>
217
+
<p>
218
+
Although Docker can help avoid installing too many detection tools locally, this does not mean that it will be automatically executed during the commit process. Therefore, when committing, you can use
0 commit comments