Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/tools/lint/test/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  test_rumdl.py

  Sprache: Python
 

import mozunit

LINTER = "rumdl"
# `fixed` is updated by the mozlint test harness (see conftest.py): when a
# linter returns a dict with a "fixed" key, the harness adds that count to
# this module-level variable. Same pattern as test_ruff_format.py.
fixed = 0


def test_lint_rumdl(lint, paths):
    results = lint(paths("bad.md"))
    assert len(results) >= 1

    rules = {r.rule for r in results}
    assert "MD022" in rules

    md022 = next(r for r in results if r.rule == "MD022")
    assert md022.relpath.endswith("bad.md")
    assert md022.lineno == 1


def test_lint_rumdl_fix(lint, create_temp_file):
    contents = "# foo\n# bar\n"
    path = create_temp_file(contents, "test_fix_rumdl.md")
    lint([path], fix=True)
    assert fixed >= 1


def test_lint_rumdl_no_markdown(lint, tmp_path):
    # rumdl prints a plain "No markdown files found to check." message (not
    # JSON) when a path contains no .md files. The linter should treat that
    # as an empty result rather than a parse error.
    (tmp_path / "not_markdown.txt").write_text("hello")
    results = lint([str(tmp_path)])
    assert results == []


if __name__ == "__main__":
    mozunit.main()

Messung V0.5 in Prozent
C=96 H=99 G=97

¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.