Sign inSign up

letompouce/mdformat

By letompouce

Updated almost 5 years ago

Docker image for executablebooks/mdformat

Image
0

1.4K

letompouce/mdformat repository overview

mdformat

A Docker image for executablebooks/mdformat.

Mdformat is an opinionated Markdown formatter that can be used to enforce a consistent style in Markdown files. Mdformat is a Unix-style command-line tool as well as a Python library.

Integrated plugins:

  • mdformat-beautysh
  • mdformat-black
  • mdformat-config
  • mdformat-shfmt

Usage

The WORKDIR is /src/. You want to bind-mount your files there:

docker run --rm -u $(id -u):$(id -g) -v $(pwd):/src letompouce/mdformat

Example:

$ docker run --rm -u $(id -u):$(id -g) -v $(pwd):/src letompouce/mdformat . --check
Error: File "/src/README.md" is not formatted
GitLab CI/CD usage

Basic invocation:

test:
  stage: test
  image:
    name: letompouce/mdformat
    entrypoint: [""]
  script:
    - mdformat --check README.md

See the .gitlab-ci.test-job.yml file.

Tag summary

Content type

Image

Digest

Size

59.6 MB

Last updated

almost 5 years ago

docker pull letompouce/mdformat