Skip to content

Commit 90f9214

Browse files
authored
Qualité : active markdownlint comme un git hook (pre-commit) - Merge #475 from geotribu/ci/markdownlint-precommit-2021-11
Qualité : active markdownlint comme un git hook (pre-commit)
2 parents 57f892e + eed4274 commit 90f9214

File tree

6 files changed

+32
-25
lines changed

6 files changed

+32
-25
lines changed

.markdownlintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
**/template_*.md
66
node_modules/
77
content/theme/
8+
content/toc_nav_ignored/snippets/

.pre-commit-config.yaml

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
# See https://pre-commit.com for more information
2-
# See https://pre-commit.com/hooks.html for more hooks
31
exclude: "node_modules|migrations|.venv|tests/dev/|tests/fixtures/"
2+
43
repos:
4+
- repo: meta
5+
hooks:
6+
- id: check-hooks-apply
7+
58
- repo: https://github.com/pre-commit/pre-commit-hooks
69
rev: v4.0.1
710
hooks:
@@ -13,29 +16,31 @@ repos:
1316
- id: trailing-whitespace
1417
args: [--markdown-linebreak-ext=md]
1518

16-
# - repo: https://github.com/igorshubovych/markdownlint-cli
17-
# rev: v0.29.0
18-
# hooks:
19-
# - id: markdownlint
20-
# args:
21-
# [
22-
# "--config",
23-
# ".markdownlint.json",
24-
# "--fix",
25-
# "-i",
26-
# "**/template_*.md",
27-
# "--output",
28-
# "linter_markdown_report.txt",
29-
# ]
30-
# language_version: "14.17.6"
19+
- repo: https://github.com/igorshubovych/markdownlint-cli
20+
rev: v0.29.0
21+
hooks:
22+
- id: markdownlint
23+
args:
24+
[
25+
"--config",
26+
".markdownlint.json",
27+
"--ignore-path",
28+
".markdownlintignore",
29+
"--fix"
30+
]
31+
language: node
32+
# language_version: "14.17.6"
33+
pass_filenames: true
34+
types: [file, markdown, non-executable]
3135

3236
# Specific part for https://pre-commit.ci
3337
ci:
3438
autofix_commit_msg: "[pre-commit.ci] Corrections automatiques appliquées par les git hooks."
3539
autofix_prs: true
3640
autoupdate_commit_msg: "[pre-commit.ci] Mise à jour des git hooks."
3741
autoupdate_schedule: monthly
38-
# skip: [
39-
# "markdownlint"
40-
# ]
42+
skip: [
43+
"check-hooks-apply",
44+
"markdownlint"
45+
]
4146
submodules: false

content/contribuer/edit/local_edition_setup.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ Après qu'une branche ait été fusionnée (*merged*), elle est automatiquement
131131
132132
# supprimer les branches qui ont été fusionnées - sauf master
133133
git branch --merged | grep -i -v -E "master|gh-pages"| xargs git branch -d
134+
135+
# supprimer les branches qui n'existent plus sur GitHub
136+
git fetch --prune && git branch -v | grep -i -E "\[disparue|gone\]" | grep -v -E "\*|master|main|gh-pages" | awk '{print $1}' | xargs git branch -D
134137
```
135138

136139
=== "Windows (Powershell)"

content/rdp/2016/rdp_2016-01-15.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ L'idée est de pouvoir avoir accès à des séries temporelles de données spati
103103

104104
[![GRASS-GIS 7](https://cdn.geotribu.fr/img/articles-blog-rdp/logiciels/grass-gis/plotting-steps.png "GRASS-GIS 7"){: .img-center loading=lazy }](https://cdn.geotribu.fr/img/articles-blog-rdp/logiciels/grass-gis/plotting-steps.png){: data-mediabox="lightbox-gallery" data-title="GRASS-GIS 7" }
105105

106-
107106
## OpenStreetMap
108107

109108
### Enquête sur les contributeurs OSM

content/rdp/2016/rdp_2016-03-11.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,6 @@ Si vous ne pouvez vous rendre à la Bibliothèque nationale de France pour obser
146146

147147
## En bref
148148

149-
- [Mapbox nous montre](https://www.mapbox.com/blog/get-started-mapillary/) comment utiliser Mapillary pour faciliter nos éditions dans OpenStreetMap
150-
- OSGEO Code Sprint, le [retour de Paul Ramsey](http://blog.cleverelephant.ca/2016/03/paris-code-sprint-postgis-recap.html) sur les ajouts apportés à PostGIS
151-
- Amusez vous à créer vos propres planètes avec [SpaceEngine](http://en.spaceengine.org/)
149+
* [Mapbox nous montre](https://www.mapbox.com/blog/get-started-mapillary/) comment utiliser Mapillary pour faciliter nos éditions dans OpenStreetMap
150+
* OSGEO Code Sprint, le [retour de Paul Ramsey](http://blog.cleverelephant.ca/2016/03/paris-code-sprint-postgis-recap.html) sur les ajouts apportés à PostGIS
151+
* Amusez vous à créer vos propres planètes avec [SpaceEngine](http://en.spaceengine.org/)

content/rdp/2016/rdp_2016-06-24.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ Et bien peut-être que cela sera derrière nous ! En effet un package vient d'ar
8383

8484
[![R + QGIS = <3](https://cdn.geotribu.fr/img/articles-blog-rdp/divers/QGis_R.png "R + QGIS = <3"){: .img-center loading=lazy }](https://cdn.geotribu.fr/img/articles-blog-rdp/divers/QGis_R.png){: data-mediabox="lightbox-gallery" data-title="R + QGIS = <3" }
8585

86-
8786
### Développer une application avec pgRouting sous Windows
8887

8988
![logo pgRouting](https://cdn.geotribu.fr/img/logos-icones/logiciels_librairies/pgRouting.png "logo pgRouting"){: .img-rdp-news-thumb }

0 commit comments

Comments
 (0)