From 3569fdac854d36db39d02c59dec2d13154e9dd49 Mon Sep 17 00:00:00 2001 From: Gonzalo Diaz Date: Tue, 23 Dec 2025 20:19:27 -0300 Subject: [PATCH 1/4] [CONFIG] [Github Actions] Now use fixed version of markdownlint --- .github/workflows/markdown-lint.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/markdown-lint.yml b/.github/workflows/markdown-lint.yml index e106928..9e07555 100644 --- a/.github/workflows/markdown-lint.yml +++ b/.github/workflows/markdown-lint.yml @@ -32,7 +32,12 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install dependencies - run: npm install -g markdownlint-cli + run: > + npm install -g --ignore-scripts markdownlint-cli@0.47.0 + + - name: Test dependencies + run: | + markdownlint --version - name: Lint run: > From 686b938945721d5d543442c257835cd401f3e9a6 Mon Sep 17 00:00:00 2001 From: Gonzalo Diaz Date: Tue, 23 Dec 2025 20:20:40 -0300 Subject: [PATCH 2/4] [CONFIG] [Github Actions] Sonarcloud Replace "read-all" with specific permissions (e.g., "contents: read"). Read-all and Write-all permissions should not be used githubactions:S8234 Beta --- .github/workflows/markdown-lint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/markdown-lint.yml b/.github/workflows/markdown-lint.yml index 9e07555..69b3b76 100644 --- a/.github/workflows/markdown-lint.yml +++ b/.github/workflows/markdown-lint.yml @@ -9,7 +9,8 @@ on: # yamllint disable-line rule:truthy branches: ["main"] workflow_dispatch: -permissions: read-all +permissions: + contents: read jobs: markdownlint: From 0419ea00b2774a2c1922da48299a23a77a0495c8 Mon Sep 17 00:00:00 2001 From: Gonzalo Diaz Date: Tue, 23 Dec 2025 20:20:40 -0300 Subject: [PATCH 3/4] [CONFIG] [Docker] Now use fixed version of markdownlint --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 282a4fc..40a2a3c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -78,7 +78,7 @@ RUN apt-key add llvm-snapshot.gpg.key && \ ADD https://deb.nodesource.com/setup_22.x nodesource_setup.sh RUN bash nodesource_setup.sh && \ apt-get -y install --no-install-recommends --no-install-suggests nodejs && \ - npm install -g --ignore-scripts markdownlint-cli && \ + npm install -g --ignore-scripts markdownlint-cli@0.47.0 && \ apt-get -y install --no-install-recommends --no-install-suggests python3-minimal python3-pip && \ rm /usr/lib/python3.*/EXTERNALLY-MANAGED && \ pip install --no-cache-dir yamllint && \ From 461be78027a88c43cb91968662ac530954542192 Mon Sep 17 00:00:00 2001 From: Gonzalo Diaz Date: Tue, 23 Dec 2025 20:22:49 -0300 Subject: [PATCH 4/4] [lint] markdownlint fixes --- docs/hackerrank/projecteuler/euler002.md | 3 ++- docs/hackerrank/projecteuler/euler003-solution-notes.md | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/hackerrank/projecteuler/euler002.md b/docs/hackerrank/projecteuler/euler002.md index 27c7fb0..a898354 100644 --- a/docs/hackerrank/projecteuler/euler002.md +++ b/docs/hackerrank/projecteuler/euler002.md @@ -3,7 +3,8 @@ - Difficulty: #easy - Category: #ProjectEuler+ -Each new term in the Fibonacci sequence is generated by adding the previous two terms. +Each new term in the Fibonacci sequence is generated by adding the previous two +terms. By starting with $ 1 $ and $ 2 $, the first $ 10 $ terms will be: $$ 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 $$ diff --git a/docs/hackerrank/projecteuler/euler003-solution-notes.md b/docs/hackerrank/projecteuler/euler003-solution-notes.md index 24828ec..3a2dfc4 100644 --- a/docs/hackerrank/projecteuler/euler003-solution-notes.md +++ b/docs/hackerrank/projecteuler/euler003-solution-notes.md @@ -33,9 +33,9 @@ The first solution, using the algorithm taught in school, is: > Using some test entries, quickly broke the solution at all. So, don't use it. > This note is just to record the failed idea. -Since by going through and proving the divisibility of a number $ i $ up to $ n $ -there are also "remainder" numbers that are also divisible by their opposite, -let's call it $ j $. +Since by going through and proving the divisibility of a number $ i $ up to +$ n $ there are also "remainder" numbers that are also divisible by their +opposite, let's call it $ j $. At first it seemed attractive to test numbers $ i $ up to half of $ n $ then test whether $ i $ or $ j $ are prime. 2 problems arise: