Coder Social home page Coder Social logo

pymarkdownlint's Introduction

pymarkdownlint (inactive)

NOTE: PyMarkDownLint is no longer under active development.

[Build Status] (https://travis-ci.org/jorisroovers/pymarkdownlint) [PyPi Package] (https://pypi.python.org/pypi/pymarkdownlint)

Markdown linter written in python. Inspired by mivok/markdownlint.

Get started by running:

markdownlint examples/             # lint all files in a directory
markdownlint examples/example1.md  # lint a single file
markdownlint examples/example1.md  # lint a single file

NOTE: The returned exit code equals the number of errors found.

Other commands and variations:

Usage: markdownlint [OPTIONS] PATH

Markdown lint tool, checks your markdown for styling issues

Options:
  --config PATH  Config file location (default: .markdownlint).
  --list-files   List markdown files in given path and exit.
  --ignore TEXT  Ignore rules (comma-separated by id or name).
  --version      Show the version and exit.
  --help         Show this message and exit.

You can modify pymarkdownlint's behavior by specifying a config file like so:

markdownlint --config myconfigfile 

By default, markdownlint will look for an optional .markdownlint file for configuration.

Config file

[general]
# rules can be ignored by name or by id
ignore=max-line-length, R3

Supported Rules

ID Name Description
R1 max-line-length Line length must be < 80 chars.
R2 trailing-whitespace Line cannot have trailing whitespace (space or tab)
R3 hard-tabs Line contains hard tab characters (\t)

Development

To run tests:

./run_tests.sh                       # run unit tests and print test coverage
./run_tests.sh --no-coverage         # run unit tests without test coverage
./run_tests.sh --pep8                # pep8 checks
./run_tests.sh --stats               # print some code stats

There is a Vagrantfile in this repository that can be used for development.

vagrant up
vagrant ssh

Wishlist

  • More rules!
  • Better output handling with verbosity levels
  • Ignore/exclude files CLI options
  • Rule specific configuration in config files
  • Auto doc generation based on rules

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.