From 7259baa2d4d44758aa4b5a32e2e7ec9ee3c36052 Mon Sep 17 00:00:00 2001 From: Igor Bogoslavskyi Date: Sat, 29 Mar 2025 14:56:34 +0100 Subject: [PATCH 1/3] Use a better link checker --- .github/.linkspector.yml | 14 ++++++++++++++ .github/mcl_config.json | 9 --------- .github/workflows/action.yml | 11 +++++++---- 3 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 .github/.linkspector.yml delete mode 100644 .github/mcl_config.json diff --git a/.github/.linkspector.yml b/.github/.linkspector.yml new file mode 100644 index 0000000..cd28119 --- /dev/null +++ b/.github/.linkspector.yml @@ -0,0 +1,14 @@ +aliveStatusCodes: + - 200 + - 206 + - 403 + +ignorePatterns: + - pattern: "^https://bazel.build" + - pattern: "^https://makefiletutorial.com" + +modifiedFilesOnly: true + +replacementPatterns: + - pattern: "(https://youtu.be/blah)" + replacement: 'https://www.google.com/404' diff --git a/.github/mcl_config.json b/.github/mcl_config.json deleted file mode 100644 index e6d168e..0000000 --- a/.github/mcl_config.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "aliveStatusCodes": [200, 206, 403], - "ignorePatterns": [ - { - "bazel": "^https://bazel.build", - "make": "^https://makefiletutorial.com" - } - ] -} diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 3ecb439..a0fb8c7 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -7,10 +7,13 @@ jobs: name: All Markdown links are valid runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: gaurav-nelson/github-action-markdown-link-check@v1 - with: - config-file: '.github/mcl_config.json' + - uses: actions/checkout@v4 + - name: Run linkspector + uses: umbrelladocs/action-linkspector@v1 + with: + reporter: github-pr-review + fail_level: any + config_file: .github/.linkspector.yml check-snippet-compilation: name: All code snippets compile From 0ba5ed101238d15107a4ddc19051948c0e03fbaa Mon Sep 17 00:00:00 2001 From: Igor Bogoslavskyi Date: Sat, 29 Mar 2025 14:58:35 +0100 Subject: [PATCH 2/3] Add a broken link for testing --- lectures/templates_why.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lectures/templates_why.md b/lectures/templates_why.md index 53dd01e..097398b 100644 --- a/lectures/templates_why.md +++ b/lectures/templates_why.md @@ -2,7 +2,7 @@ Why use templates? ---

- Video + Video

- [Why use templates?](#why-use-templates) From fa71c4168a74348c774f1d3bad752bdda51edbac Mon Sep 17 00:00:00 2001 From: Igor Bogoslavskyi Date: Sat, 29 Mar 2025 15:49:23 +0100 Subject: [PATCH 3/3] Keep on testing --- .github/.linkspector.yml | 13 ++++++++----- lectures/compilation_debugging.md | 2 +- lectures/cpp_basic_types_and_variables.md | 2 +- lectures/hello_world_dissection.md | 4 ++-- lectures/templates_why.md | 3 ++- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/.linkspector.yml b/.github/.linkspector.yml index cd28119..56b8433 100644 --- a/.github/.linkspector.yml +++ b/.github/.linkspector.yml @@ -1,14 +1,17 @@ +dirs: + - . +excludedDirs: + - workflows + - animation + - scripts aliveStatusCodes: - 200 - 206 - 403 - ignorePatterns: - pattern: "^https://bazel.build" - pattern: "^https://makefiletutorial.com" - modifiedFilesOnly: true - replacementPatterns: - - pattern: "(https://youtu.be/blah)" - replacement: 'https://www.google.com/404' + - pattern: "" + replacement: "[blah](https://blah.blah)" diff --git a/lectures/compilation_debugging.md b/lectures/compilation_debugging.md index 408488a..9e4ec66 100644 --- a/lectures/compilation_debugging.md +++ b/lectures/compilation_debugging.md @@ -35,7 +35,7 @@ Style (🎨) and software design (πŸŽ“) recommendations mostly come from [Google ```cmd c++ -std=c++17 -o test test.cpp ``` -- βœ… Enable **most** [warnings](https://gcc.gnu.org/onlinedocs/gcc/gcc-command-options/options-to-request-or-suppress-warnings.html#cmdoption-Wall), treat them as errors: +- βœ… Enable **most** [warnings](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wall), treat them as errors: `-Wall`, `-Wextra`, `-Wpedantic`, `-Werror` - Other warnings possible too: `-Wimplicit-fallthrough`, `-Wsign-conversion`, etc. diff --git a/lectures/cpp_basic_types_and_variables.md b/lectures/cpp_basic_types_and_variables.md index fc42429..7c6da40 100644 --- a/lectures/cpp_basic_types_and_variables.md +++ b/lectures/cpp_basic_types_and_variables.md @@ -148,7 +148,7 @@ int main() { --- -# Always initialize all variables! 🚨 +# Always initialize all variables! (unless measured slow, stay tuned to a later point in the course)