https://github.com/akiomik/mado

A fast Markdown linter written in Rust.

https://github.com/akiomik/mado

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.2%) to scientific vocabulary

Keywords

github-actions linter markdown rust

Keywords from Contributors

distributed serial interactive projection archival sequences genomics observability autograding hacking
Last synced: 5 months ago · JSON representation

Repository

A fast Markdown linter written in Rust.

Basic Info
  • Host: GitHub
  • Owner: akiomik
  • License: apache-2.0
  • Language: Rust
  • Default Branch: main
  • Homepage:
  • Size: 1.16 MB
Statistics
  • Stars: 152
  • Watchers: 2
  • Forks: 8
  • Open Issues: 17
  • Releases: 10
Topics
github-actions linter markdown rust
Created about 1 year ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License

README.md

Mado

CI codecov

A fast Markdown linter written in Rust. Compatible with CommonMark and GitHub Flavored Markdown (GFM).

Usage

bash mado check . mado check path/to/*.md

Performance

Approx. 49-60x faster than existing linters (e.g. markdownlint).

```mermaid

config: xyChart: height: 200 titleFontSize: 14 chartOrientation: horizontal xAxis: labelFontSize: 12 titleFontSize: 14 yAxis: labelFontSize: 12

titleFontSize: 14

xychart-beta title "Linting ~1,500 Markdown files (Lower is faster)" x-axis ["mado (rust)", "markdownlint-cli (node.js)", "markdownlint (ruby)", "markdownlint-cli2 (node.js)"] y-axis "Time (seconds)" 0 --> 10 bar [0.129, 6.381, 6.609, 7.817] ```

This benchmark was conducted on a MacBook Pro (2021, M1 Max) using hyperfine with GitLab documentation as the dataset.

Installation

Homebrew (macOS and Linux)

bash brew tap akiomik/mado https://github.com/akiomik/mado.git brew install mado

Nix (macOS and Linux)

bash nix profile install github:akiomik/mado

Arch Linux (Linux)

bash pacman -S mado

Scoop (Windows)

bash scoop install https://raw.githubusercontent.com/akiomik/mado/refs/heads/main/pkg/scoop/mado.json

WinGet (Windows)

```bash

For security reasons, installing from local manifest files requires that this feature be enabled by an administrator.

For more details, see https://learn.microsoft.com/en-us/windows/package-manager/winget/install#local-install

winget settings --enable LocalManifestFiles

curl.exe -o mado.yml https://raw.githubusercontent.com/akiomik/mado/refs/heads/main/pkg/winget/mado.yml winget install -m mado.yml ```

Manually

Pre-built binaries are available for download from the release page.

Supported Rules

Mado supports most markdownlint rules.

  • :whitecheckmark: Stable support
  • :hammer: Unstable support
  • :warning: Unsupported option(s)
  • :x: Not supported

| Rule | Support | Note | |-------|--------------------|------------------------------------------------| | MD001 | :whitecheckmark: | | | MD002 | :whitecheckmark: | | | MD003 | :hammer: | | | MD004 | :whitecheckmark: | | | MD005 | :whitecheckmark: | | | MD006 | :whitecheckmark: | | | MD007 | :hammer: | | | MD009 | :whitecheckmark: | | | MD010 | :whitecheckmark: | | | MD012 | :whitecheckmark: | | | MD013 | :whitecheckmark: | | | MD014 | :whitecheckmark: | | | MD018 | :whitecheckmark: | | | MD019 | :whitecheckmark: | | | MD020 | :hammer: | | | MD021 | :whitecheckmark: | | | MD022 | :whitecheckmark: | | | MD023 | :whitecheckmark: | | | MD024 | :whitecheckmark: | | | MD025 | :whitecheckmark: | | | MD026 | :whitecheckmark: | | | MD027 | :hammer: | | | MD028 | :whitecheckmark: | | | MD029 | :whitecheckmark: | | | MD030 | :whitecheckmark: | | | MD031 | :whitecheckmark: | | | MD032 | :hammer: | | | MD033 | :whitecheckmark: | | | MD034 | :whitecheckmark: | | | MD035 | :whitecheckmark: | | | MD036 | :whitecheckmark: | | | MD037 | :whitecheckmark: | | | MD038 | :whitecheckmark: | | | MD039 | :whitecheckmark: | | | MD040 | :whitecheckmark: | | | MD041 | :whitecheckmark: | | | MD046 | :whitecheckmark: | | | MD047 | :whitecheckmark: | |

Configuration

Mado can be configured via mado.toml or .mado.toml file in the current directory. You can also use global configuration files located in:

  • Linux: ~/.config/mado/mado.toml
  • macOS: ~/.config/mado/mado.toml
  • Windows: ~\AppData\Roaming\mado\mado.toml

For more details, see the example mado.toml and the JSON Schema for mado.toml.

GitHub Actions

Mado is compatible with GitHub Actions.

```yaml

Basic usage (runs mado check .)

  • uses: akiomik/mado@v0.3.0

Custom usage (runs mado with specified arguments)

  • uses: akiomik/mado@v0.3.0 with: args: '--config path/to/mado.toml check path/to/*.md' ```

Development

just is required.

Running Tests

bash just test

Linting Code

bash just lint

Benchmarking

```bash

Download Markdown dataset

./scripts/benchmarks/setup.sh

Benchmark mado, mdl and markdownlint-cli using hyperfine

./scripts/benchmarks/comparison.sh ```

Profiling

First, install flamegraph:

bash cargo install flamegraph

Then run:

bash just flamegraph

Fuzz Testing

First, install cargo-fuzz:

bash cargo install cargo-fuzz

Then run:

bash just fuzz

Owner

  • Name: Akiomi KAMAKURA
  • Login: akiomik
  • Kind: user
  • Location: Japan

Bird lover.

GitHub Events

Total
  • Create event: 165
  • Issues event: 7
  • Release event: 19
  • Watch event: 109
  • Delete event: 162
  • Issue comment event: 108
  • Push event: 232
  • Public event: 1
  • Pull request event: 306
  • Fork event: 4
Last Year
  • Create event: 165
  • Issues event: 7
  • Release event: 19
  • Watch event: 109
  • Delete event: 162
  • Issue comment event: 108
  • Push event: 232
  • Public event: 1
  • Pull request event: 306
  • Fork event: 4

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 474
  • Total Committers: 4
  • Avg Commits per committer: 118.5
  • Development Distribution Score (DDS): 0.11
Past Year
  • Commits: 474
  • Committers: 4
  • Avg Commits per committer: 118.5
  • Development Distribution Score (DDS): 0.11
Top Committers
Name Email Commits
Akiomi Kamakura a****k@g****m 422
dependabot[bot] 4****] 50
Mads Hougesen m****s@m****k 1
Francis T. O'Donovan f****n@p****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 6
  • Total pull requests: 266
  • Average time to close issues: 4 minutes
  • Average time to close pull requests: 2 days
  • Total issue authors: 4
  • Total pull request authors: 6
  • Average comments per issue: 0.67
  • Average comments per pull request: 0.57
  • Merged pull requests: 222
  • Bot issues: 0
  • Bot pull requests: 101
Past Year
  • Issues: 6
  • Pull requests: 266
  • Average time to close issues: 4 minutes
  • Average time to close pull requests: 2 days
  • Issue authors: 4
  • Pull request authors: 6
  • Average comments per issue: 0.67
  • Average comments per pull request: 0.57
  • Merged pull requests: 222
  • Bot issues: 0
  • Bot pull requests: 101
Top Authors
Issue Authors
  • dvzrv (3)
  • avdb13 (1)
  • DockterTeagle (1)
  • Cheekie25 (1)
Pull Request Authors
  • akiomik (162)
  • dependabot[bot] (100)
  • hougesen (2)
  • proinsias (2)
  • harilvfs (1)
  • DockterTeagle (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (108) rust (60) chore (41) enhancement (27) test (12) refactoring (8) bug (7) misc (7) documentation (6) ci (6) breaking change (5) performance (4) style (2) build (1) javascript (1)