Trailing spaces in markdown files are not detected by this project's "Check Code" job
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3543301. --> Reported by: [jonathan1055](https://www.drupal.org/user/92645) Related to !404 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Trailing spaces in .md files are not checked and reported by this project's "Check Code" job. Trailing spaces are reported by some of the other code quality and linting jobs, and it is general best practice to avoid trailing spaces.</p> <p>Whilst there is not yet any agreed coding standard for Markdown files, the <a href="https://www.drupal.org/project/coding_standards">Drupal Coding Standards</a> projects are discussing the topic:<br> <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-4"><a href="https://www.drupal.org/project/coding_standards/issues/2191525" title="Status: Postponed">#2191525: [PP-1][policy, no patch] Extend Markdown coding standards to support API module (DOXYGEN)</a></span><br> <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-5"><a href="https://www.drupal.org/project/coding_standards/issues/2952616" title="Status: Closed (won't fix)">#2952616: Adopt CommonMark spec for Markdown files</a></span><br> <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/coding_standards/issues/3012906" title="Status: Closed (fixed)">#3012906: Add Markdown to list of module documentation file types</a></span></p> <p>However, it would benefit this project if we detected and prevented trailing spaces. The problem occurs when making documentation edits using the web UI (which is useful as it gives a realtime preview). Trailing spaces are hard to detect and can be commited without knowing. Then when the doc page is edited locally or in other editors, where trailing spaces are stripped automatcally, we get unintended and unrelated changes.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Investigate if .md files can be included in one of the other code quality/linting jobs that this project runs on it's own files. This is not a proposal to add the solution to the Contrib jobs (at least, not initially)</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3>
issue