Skip to content

lint: consider scope of markdown linting in configlet #562

Open
@ee7

Description

@ee7

Follow-up on some discussions with Erik, starting from implementation options for #328.

I suggested that for a first implementation of markdown linting, we could consider adding markdownlint as an org-wide workflow (rather than adding it to configlet lint).

The downside: running configlet lint locally runs a smaller subset of checks that occur in CI. But configlet lint is not supposed to be the only CI check for every track, and even for configlet lint JSON checking we might add CI-only checks anyway (e.g. for Exercise-wide checks - see #178).


@ee7 wrote:

There is some question about how to separate things. For a simpler example, it's probably nice to have org-wide whitespace checking. So should configlet lint do that, or an org-wide workflow?

There we might argue that:

  1. The scope of configlet lint is track repos
  2. Exercism has more than just track repos
  3. Other repos might have whitespace problems
  4. Therefore whitespace checking should be done outside of configlet lint

Regarding the markdownlint option, I guess it depends on how many rules we have that markdownlint cannot catch. That is, things that are valid markdown, but violate some Exercism-specific linting rule.

By the same reasoning, it makes sense to have the JSON linting in configlet lint (as we have already), because:

  1. The scope of configlet lint is track repos
  2. Only track repos have certain JSON files
  3. Parsing JSON (and confirming that it's valid) is easy
  4. We're checking lots of Exercism-specific rules that are not about JSON validity, and are even difficult/impossible to express in e.g. JSON schema
  5. With those files, it's more useful to have fast local linting without installing dependencies (which configlet provides)

But if we want lots of the checks that markdownlint provides, it's probably a significant amount of work to essentially reimplement markdownlint in pure Nim

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions