Skip to content

Commit

Permalink
Lint Markdown and YAML files
Browse files Browse the repository at this point in the history
  • Loading branch information
replaceafill authored Mar 16, 2024
1 parent 0169369 commit 827cfca
Show file tree
Hide file tree
Showing 10 changed files with 162 additions and 107 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ jobs:
runs-on: "ubuntu-22.04"
steps:
- name: "Check out repository"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Set up Python"
uses: "actions/setup-python@v4"
uses: "actions/setup-python@v5"
with:
python-version: "3.10"
- name: "Get pip cache dir"
id: "pip-cache"
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: "Cache pip packages"
uses: "actions/cache@v3"
uses: "actions/cache@v4"
with:
path: "${{ steps.pip-cache.outputs.dir }}"
key: "${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}"
Expand All @@ -39,6 +39,6 @@ jobs:
name: "Linting"
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected].0
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v5"
- uses: "pre-commit/[email protected].1"
10 changes: 10 additions & 0 deletions .markdownlint.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"default": true,
"MD010": {
"code_blocks": false
},
"MD013": {
"code_blocks": false,
"tables": false
}
}
34 changes: 31 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
repos:
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v0.9.1
- repo: "https://github.com/sphinx-contrib/sphinx-lint"
rev: "v0.9.1"
hooks:
- id: sphinx-lint
- id: "sphinx-lint"
- repo: "https://github.com/igorshubovych/markdownlint-cli"
rev: "v0.39.0"
hooks:
- id: "markdownlint"
exclude: |
(?x)^(
issue_template\.md
)
- repo: "https://github.com/adrienverge/yamllint"
rev: "v1.34.0"
hooks:
- id: "yamllint"
- repo: "https://github.com/thlorenz/doctoc"
rev: "v2.2.0"
hooks:
- id: "doctoc"
files: |
(?x)^(
style_guide\.md
)
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: "v4.5.0"
hooks:
- id: "trailing-whitespace"
exclude: |
(?x)^(
locale/.*
)
4 changes: 4 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
rules:
line-length: "disable"
quoted-strings: "enable"
1 change: 0 additions & 1 deletion dev-manual/api/_code/admin_levels_of_desc_req.curl
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Host: mytestinstance.archivematica.net'

1 change: 0 additions & 1 deletion dev-manual/api/_code/completed_request.curl
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ curl -X GET \
http://test.archivematica.org/api/transfer/completed/ \
-H 'Accept: */*' \
-H 'Authorization: ApiKey [_your_username_]:[_your_ApiKey_]' \

4 changes: 2 additions & 2 deletions dev-manual/api/_code/reingest_aip_response.curl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"error": false,
"message": "Package 868a7ecd-c31b-4773-ad6d-d736a35b8a6e sent to pipeline
Archivematica on test-vm (85f9db99-b187-47c3-9b5b-abc123)
"message": "Package 868a7ecd-c31b-4773-ad6d-d736a35b8a6e sent to pipeline
Archivematica on test-vm (85f9db99-b187-47c3-9b5b-abc123)
for re-ingest",
"reingest_uuid": "affa2d71-3fdb-423f-8fe2-91c8d5ecc324",
"status_code": 202
Expand Down
1 change: 0 additions & 1 deletion dev-manual/api/_code/sips-waiting_request.curl
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ curl -X GET \
http://mytestinstance.archivematica.net/api/ingest/waiting \
-H 'Authorization: ApiKey admin:ooha0sshie8O' \
-H 'Host: mytestinstsance.archivematica.net' \

1 change: 0 additions & 1 deletion dev-manual/api/_code/status_request.curl
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ curl -X GET \
status/89fd478d-c896-461a-baec-5d1faf661020/ \
-H 'Authorization: ApiKey [_your_username_]:[_your_ApiKey_]' \
-H 'Host: my_archivematica_instance.archivematica.org'

Loading

0 comments on commit 827cfca

Please sign in to comment.