Skip to content

Investigate a Markdown Linting CI Pipeline and Bash Script for local dev #164

@PeteZ238

Description

@PeteZ238

Investigate creating a markdown linting CI/CD pipeline to promote consistency across contributors and catch difficult to identify issues such as broken links.

Also, investigate a bash script to set up a local development environment that does not clutter the project with the additional required files.

Sample files from PR #152

  • .markdownlint.json
{
    "comment": "Markdown Lint Rules",
    "default": true,
    "MD007": {
      "indent": 4
    },
    "MD013": false,
    "MD024": false,
    "MD025": {
      "front_matter_title": ""
    },
    "MD029": {
      "style": "one_or_ordered"
    },
    "MD033": false
  }
  • .pre-commit-config.yaml
default_stages: [pre-commit, manual]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
  rev: v6.0.0
  hooks:
    - id: trailing-whitespace
    - id: end-of-file-fixer
    - id: check-yaml
      args: ["--unsafe"]
    - id: check-added-large-files

- repo: https://github.com/tcort/markdown-link-check
  rev: v3.13.7
  hooks:
    - id: markdown-link-check
      args: [-q]

- repo: https://github.com/igorshubovych/markdownlint-cli
  rev: v0.45.0
  hooks:
  - id: markdownlint
    args: ["--ignore", "CHANGELOG.md", "--fix"]
  • CONTRIBUTING.md

Create a local development environment

  • Create a Python virtual environment
python -m venv .venv
  • Activate the virtual environment

    Windows Development Environment
    .venv/Scripts/activate
    Unix Development Environment
    source .venv/bin/activate
  • Install the required dependencies

pip install -r requirements.txt
  • Install the pre-commit hooks
pre-commit install

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions