style(format): lint markdown (#1131)

- **chore: Fix line endings for changelog**
- **chore: cleanup markdown lints**
- **ci: add Markdown linter**
- **build: add markdown lint to the makefile**

---------

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
This commit is contained in:
Josh McKinney 2024-08-03 10:26:04 -07:00 committed by GitHub
parent 29c8c84fd0
commit a80a8a6a47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 23 additions and 5 deletions

View file

@ -60,6 +60,17 @@ jobs:
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- run: cargo make clippy - run: cargo make clippy
markdownlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint markdown
uses: DavidAnson/markdownlint-cli2-action@v16
with:
globs: |
'**/*.md'
'!target'
coverage: coverage:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View file

@ -19,11 +19,11 @@ alias = "ci"
[tasks.ci] [tasks.ci]
description = "Run continuous integration tasks" description = "Run continuous integration tasks"
dependencies = ["lint-style", "clippy", "check", "test"] dependencies = ["lint", "clippy", "check", "test"]
[tasks.lint-style] [tasks.lint]
description = "Lint code style (formatting, typos, docs)" description = "Lint code style (formatting, typos, docs, markdown)"
dependencies = ["lint-format", "lint-typos", "lint-docs"] dependencies = ["lint-format", "lint-typos", "lint-docs", "lint-markdown"]
[tasks.lint-format] [tasks.lint-format]
description = "Lint code formatting" description = "Lint code formatting"
@ -56,6 +56,11 @@ args = [
"-Dwarnings", "-Dwarnings",
] ]
[tasks.lint-markdown]
description = "Check markdown files for errors and warnings"
command = "markdownlint-cli2"
args = ["**/*.md", "!target"]
[tasks.check] [tasks.check]
description = "Check code for errors and warnings" description = "Check code for errors and warnings"
command = "cargo" command = "cargo"

View file

@ -6,4 +6,4 @@ We only support the latest version of this crate.
## Reporting a Vulnerability ## Reporting a Vulnerability
To report secuirity vulnerability, please use the form at https://github.com/ratatui-org/ratatui/security/advisories/new To report secuirity vulnerability, please use the form at <https://github.com/ratatui-org/ratatui/security/advisories/new>

View file

@ -11,6 +11,8 @@ header = """
# Changelog # Changelog
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
<!-- ignore lint rules that are often triggered by content generated from commits / git-cliff -->
<!-- markdownlint-disable line-length no-bare-urls ul-style emphasis-style -->
""" """
# template for the changelog body # template for the changelog body
# https://keats.github.io/tera/docs/#introduction # https://keats.github.io/tera/docs/#introduction