Skip to content

bug: Markdownlint Action Ignore Templates#53

Merged
egrace479 merged 9 commits intomainfrom
bug/issue-52/markdownlint-action-ignore-templates
Jan 26, 2026
Merged

bug: Markdownlint Action Ignore Templates#53
egrace479 merged 9 commits intomainfrom
bug/issue-52/markdownlint-action-ignore-templates

Conversation

@EmersonFras
Copy link
Copy Markdown
Contributor

@EmersonFras EmersonFras commented Jan 26, 2026

Summary

The markdown lint action was not ignoring files listed in the markdownlintignore. To ensure the linter ignores these files we must clearly define them in the linters yaml file by including what files to ignore.

Testing

Below was tested with an added file docs/wiki-guides/HF_test_Template.md which had syntax the linter would raise errors to and we can see the linter ignored the file.

image

Below we can see what happens before our solution was implemented and we can see the linter was not working and instead raising errors about HF_test_Template.md

image

Verification of the configuration file being respected below:

image

Here is the test MD file we used to ensure the linter respects our rules in mardownlint.json.

# Test File for Markdownlint Config

## Rule MD007: Indentation (Should allow 4 spaces)

* Level 1
    * Level 2 (This uses 4 spaces. If the linter errors, the config isn't working.)

## Rule MD013: Line Length (Should be ignored)

This is an incredibly long line of text that exceeds the default 80-character limit usually enforced by markdownlint. Because MD013 is set to false, this line should not trigger any warnings or errors regardless of how long it gets.

## Rule MD026: Trailing Punctuation (Should allow only specific marks)

### This header ends with a question mark?

### This header ends with an exclamation point!

## Rule MD040: Fenced Code Language (Should be ignored)

```
This code block has no language specified. Normally, this triggers a warning, but it should be ignored now.
```

## Rule MD046: Code Block Style (Should be ignored)

    This is an indented code block (4 spaces).
    Normally, markdownlint prefers fenced blocks (```), but this should be ignored.

## Hard Tabs (Should be allowed)

*	This line uses a hard tab after the bullet point instead of a space.

Closes #52

@EmersonFras EmersonFras changed the title Bug/issue 52/markdownlint action ignore templates bug: Markdownlint Action Ignore Templates Jan 26, 2026
@EmersonFras EmersonFras marked this pull request as ready for review January 26, 2026 15:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the markdownlint GitHub Action workflow to properly ignore template files that should not be linted. The issue was that the .markdownlintignore file was not being respected, so the solution adds explicit files_ignore patterns to the tj-actions/changed-files action configuration to prevent ignored files from being passed to the linter.

Changes:

  • Added files_ignore parameter to the changed-files action to exclude HuggingFace template files and mkdocs.yaml from markdown linting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>
@egrace479 egrace479 merged commit 7fe9a97 into main Jan 26, 2026
1 check passed
@egrace479 egrace479 deleted the bug/issue-52/markdownlint-action-ignore-templates branch January 26, 2026 20:59
egrace479 added a commit to Imageomics/Imageomics-guide that referenced this pull request Jan 27, 2026
Pull from Collab Guide [PR 53](Imageomics/Collaborative-distributed-science-guide#53)

* Include ignore in config

* test: template that should be ignored

* Specifically ignore files in lint.yaml

* test: Remove test file

* test: ensure config file is working with test md file

* test: fix extra errors in the test md file

* test: fix un-intended errors in test file

* test: cleanup

* Remove redundant yaml ignore from linter

Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>

---------

Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>
egrace479 added a commit to ABC-Center/ABC-guide that referenced this pull request Jan 27, 2026
Pull from Collab Guide [PR 53](Imageomics/Collaborative-distributed-science-guide#53)

* Include ignore in config

* test: template that should be ignored

* Specifically ignore files in lint.yaml

* test: Remove test file

* test: ensure config file is working with test md file

* test: fix extra errors in the test md file

* test: fix un-intended errors in test file

* test: cleanup

* Remove redundant yaml ignore from linter

Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>

---------

Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>
egrace479 added a commit to Imageomics/Imageomics-guide that referenced this pull request Jan 28, 2026
Pull from Collab Guide [PR 53](Imageomics/Collaborative-distributed-science-guide#53)

* Include ignore in config

* test: template that should be ignored

* Specifically ignore files in lint.yaml

* test: Remove test file

* test: ensure config file is working with test md file

* test: fix extra errors in the test md file

* test: fix un-intended errors in test file

* test: cleanup

* Remove redundant yaml ignore from linter

Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>

---------

Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>
egrace479 added a commit to ABC-Center/ABC-guide that referenced this pull request Jan 28, 2026
Pull from Collab Guide [PR 53](Imageomics/Collaborative-distributed-science-guide#53)

* Include ignore in config

* test: template that should be ignored

* Specifically ignore files in lint.yaml

* test: Remove test file

* test: ensure config file is working with test md file

* test: fix extra errors in the test md file

* test: fix un-intended errors in test file

* test: cleanup

* Remove redundant yaml ignore from linter

Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>

---------

Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Markdownlint action isn't ignoring templates

3 participants