From af360107cd669bfcc89fec7577927dc7ae7f55e3 Mon Sep 17 00:00:00 2001 From: Yury Bayda Date: Sun, 2 Aug 2026 20:40:44 -0700 Subject: [PATCH] ci: lint Markdown --- .github/workflows/main.yml | 5 +++++ .markdownlint.json | 8 ++++++++ README.md | 18 +++++++++--------- 3 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 .markdownlint.json diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dd59feb..b1e9be8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,6 +13,11 @@ jobs: steps: - uses: actions/checkout@v7 + - name: Lint Markdown + uses: DavidAnson/markdownlint-cli2-action@v23 + with: + globs: "**/*.md" + - uses: actions/setup-python@v7 with: python-version: "3.11" diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..2bf8ad4 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,8 @@ +{ + "MD013": { + "line_length": 100 + }, + "MD024": { + "siblings_only": true + } +} diff --git a/README.md b/README.md index eece9ea..051b572 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ test-driven development. ## Instructions -Roman numerals are a numeral system that was used by ancient Rome. Numbers in +Roman numerals are a numeral system that was used by ancient Rome. Numbers in this system use letters from the Latin alphabet. Currently, it uses seven symbols: | Symbol | Value | @@ -38,9 +38,9 @@ In general, the values for 5, 50, and 500 are not subtracted. The task at hand entails crafting a function `to_roman(number: int) -> str` to convert regular Arabic numbers into Roman numerals, such as: -* 4 → IV -* 7 → VII -* 9 → IX +- 4 → IV +- 7 → VII +- 9 → IX The lowest number you can write in Roman Numerals is number I (1). And the largest numeral is MMMCMXCIX (3999). @@ -51,15 +51,15 @@ In this phase, the objective is to develop a function `from_roman(number: str) -> int` that performs the reverse conversion, transforming Roman numerals into their corresponding Arabic digits. -## Guiding Principles +## Guiding principles -* If you don't know an existing algorithm, follow the principles of strict +- If you don't know an existing algorithm, follow the principles of strict Test-Driven Development (TDD) to derive one. -* Reflect on whether the sequence in which you write tests influences the final +- Reflect on whether the sequence in which you write tests influences the final design of your algorithm. -* Consider whether it's more beneficial to devise an algorithm before embarking +- Consider whether it's more beneficial to devise an algorithm before embarking on TDD, especially if you don't already know one. -* If you do know an algorithm, evaluate if it can be implemented using strict +- If you do know an algorithm, evaluate if it can be implemented using strict TDD principles. ## Prerequisites