Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up dead link checker in CI #1330

Merged
merged 20 commits into from
Jul 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,24 @@ jobs:

- name: Run Checks
run: bin/ci.sh

linkChecker:
name: Link Checker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Retrieve Lychee Cache
uses: actions/cache@v3
id: lychee-cache # id to use in retrieve action
with:
path: .lycheecache
key: lychee-v1

- name: Link Checker
uses: lycheeverse/lychee-action@v1
with:
args: --cache --max-cache-age 7d --require-https --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36" --no-progress './**/*.md' './**/*.html' './**/*.json'
fail: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
21 changes: 21 additions & 0 deletions .github/workflows/pr.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,24 @@ jobs:

- name: Run exercism/elixir ci (runs tests)
run: bin/pr.sh

linkChecker:
name: Link Checker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Retrieve Lychee Cache
uses: actions/cache@v3
id: lychee-cache # id to use in retrieve action
with:
path: .lycheecache
key: lychee-v1

- name: Link Checker
uses: lycheeverse/lychee-action@v1
with:
args: --cache --max-cache-age 7d --require-https --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36" --no-progress './**/*.md' './**/*.html' './**/*.json'
fail: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
7 changes: 7 additions & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
irc://irc.libera.chat/elixir
collinsdictionary\.com
users.csc.calpoly.edu
github.com/pulls
twitter.com
regexr.com
papyr.com
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Please keep the following in mind:

- For practice exercises, `instructions.md` come from the [problem specifications](https://github.com/exercism/problem-specifications) repository. They cannot be changed without updating them in that repository first. If Elixir-specific changes are necessary, than can be appended to the instructions by creating a `instructions.append.md` file.

- For practice exercises, use typespecs in the example and template files as described [here](http://elixir-lang.org/getting-started/typespecs-and-behaviours.html).
- For practice exercises, use typespecs in the example and template files as described [here](https://elixir-lang.org/getting-started/typespecs-and-behaviours.html).

- Each practice exercise test file should have a `test_helper.exs` with code like the following at the top of the file.
This allows the tests to be run on CI and configures tests to be skipped with the `:pending` flag.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## Setup

The exercises currently target Elixir versions from 1.10 to 1.15 and Erlang/OTP versions from 21 to 26. Detailed installation instructions can be found at
[http://elixir-lang.org/install.html](http://elixir-lang.org/install.html). We recommend using the [asdf version manager](https://github.com/asdf-vm/asdf) to manage multiple Elixir versions.
[https://elixir-lang.org/install.html](https://elixir-lang.org/install.html). We recommend using the [asdf version manager](https://github.com/asdf-vm/asdf) to manage multiple Elixir versions.

## Testing

Expand Down
2 changes: 1 addition & 1 deletion concepts/docs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ If a module or a function is intended for internal usage only, you can mark it w
[hexdocs-pm]: https://hexdocs.pm/
[writing-documentation-recommendations]: https://hexdocs.pm/elixir/writing-documentation.html#recommendations
[intellij-elixir-documentation]: https://github.com/KronicDeth/intellij-elixir#quick-documentation
[vsc-documentation]: https://thinkingelixir.com/elixir-in-vs-code/#Documentation_displayed_on_hover
[vsc-documentation]: https://fly.io/phoenix-files/setup-vscode-for-elixir-development/
[iex-h]: https://hexdocs.pm/iex/IEx.Helpers.html#h/1
[getting-started-iex]: https://elixir-lang.org/getting-started/introduction.html#interactive-mode
[hiding-internal-modules-and-functions]: https://hexdocs.pm/elixir/writing-documentation.html#hiding-internal-modules-and-functions
Expand Down
32 changes: 16 additions & 16 deletions concepts/erlang-libraries/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,21 @@ Elixir interoperability with Erlang libraries is not limited to Erlang's standar

[erlang]: https://en.wikipedia.org/wiki/Erlang_(programming_language)
[beam]: https://en.wikipedia.org/wiki/BEAM_(Erlang_virtual_machine)
[erl-stdlib-ref]: http://www.erlang.org/doc/apps/stdlib/index.html
[erl-timer-sleep]: http://www.erlang.org/doc/man/timer.html#sleep-1
[erl-timer-send-after]: http://www.erlang.org/doc/man/timer.html#send_after-2
[erl-timer-send-interval]: http://www.erlang.org/doc/man/timer.html#send_interval-2
[erl-rand-uniform]: http://www.erlang.org/doc/man/rand.html#uniform-0
[erl-rand-normal]: http://www.erlang.org/doc/man/rand.html#normal-0
[erl-rand-seed-2]: http://www.erlang.org/doc/man/rand.html#seed-2
[erl-io-lib-format]: http://www.erlang.org/doc/man/io_lib.html#format-2
[erl-math-sin]: http://www.erlang.org/doc/man/math.html#sin-1
[erl-math-cos]: http://www.erlang.org/doc/man/math.html#cos-1
[erl-math-log2]: http://www.erlang.org/doc/man/math.html#log2-1
[erl-math-log10]: http://www.erlang.org/doc/man/math.html#log10-1
[erl-math-pow]: http://www.erlang.org/doc/man/math.html#pow-2
[erl-queue]: http://www.erlang.org/doc/man/queue.html
[erl-crypto]: http://www.erlang.org/doc/man/crypto.html
[erl-zip]: http://www.erlang.org/doc/man/zip.html
[erl-stdlib-ref]: https://www.erlang.org/doc/apps/stdlib/index.html
[erl-timer-sleep]: https://www.erlang.org/doc/man/timer.html#sleep-1
[erl-timer-send-after]: https://www.erlang.org/doc/man/timer.html#send_after-2
[erl-timer-send-interval]: https://www.erlang.org/doc/man/timer.html#send_interval-2
[erl-rand-uniform]: https://www.erlang.org/doc/man/rand.html#uniform-0
[erl-rand-normal]: https://www.erlang.org/doc/man/rand.html#normal-0
[erl-rand-seed-2]: https://www.erlang.org/doc/man/rand.html#seed-2
[erl-io-lib-format]: https://www.erlang.org/doc/man/io_lib.html#format-2
[erl-math-sin]: https://www.erlang.org/doc/man/math.html#sin-1
[erl-math-cos]: https://www.erlang.org/doc/man/math.html#cos-1
[erl-math-log2]: https://www.erlang.org/doc/man/math.html#log2-1
[erl-math-log10]: https://www.erlang.org/doc/man/math.html#log10-1
[erl-math-pow]: https://www.erlang.org/doc/man/math.html#pow-2
[erl-queue]: https://www.erlang.org/doc/man/queue.html
[erl-crypto]: https://www.erlang.org/doc/man/crypto.html
[erl-zip]: https://www.erlang.org/doc/man/zip.html
[erl-calendar]: https://www.erlang.org/doc/man/calendar.html
[erl-calendar-iso-week-number]: https://www.erlang.org/doc/man/calendar.html#iso_week_number-1
2 changes: 1 addition & 1 deletion concepts/erlang-libraries/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ The most commonly used Erlang functions that do not have an Elixir equivalent ar

To discover Erlang's standard library, explore the [STDLIB Reference Manual][erl-stdlib-ref].

[erl-stdlib-ref]: http://www.erlang.org/doc/apps/stdlib/index.html
[erl-stdlib-ref]: https://www.erlang.org/doc/apps/stdlib/index.html
2 changes: 1 addition & 1 deletion concepts/erlang-libraries/links.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Getting Started - Erlang libraries"
},
{
"url": "http://www.erlang.org/doc/apps/stdlib/index.html",
"url": "https://www.erlang.org/doc/apps/stdlib/index.html",
"description": "Erlang's STDLIB Reference Manual "
}
]
2 changes: 1 addition & 1 deletion concepts/pattern-matching/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ end
# => ** (FunctionClauseError) no function clause matching in Example.named_function/1
```

[assertive-style]: http://blog.plataformatec.com.br/2014/09/writing-assertive-code-with-elixir/
[assertive-style]: https://blog.plataformatec.com.br/2014/09/writing-assertive-code-with-elixir/
[pattern-match-doc]: https://elixir-lang.org/getting-started/pattern-matching.html
[match-op]: https://hexdocs.pm/elixir/Kernel.SpecialForms.html#=/2
[getting-started-pin-operator]: https://elixir-lang.org/getting-started/pattern-matching.html#the-pin-operator
10 changes: 5 additions & 5 deletions concepts/randomness/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ The random values returned by `Enum.random` and the Erlang's `rand` module are n
[enum-random]: https://hexdocs.pm/elixir/Enum.html#random/1
[enum-take-random]: https://hexdocs.pm/elixir/Enum.html#take_random/2
[enum-shuffle]: https://hexdocs.pm/elixir/Enum.html#shuffle/1
[erl-rand]: http://www.erlang.org/doc/man/rand.html
[erl-crypto-strong-rand-bytes]: http://www.erlang.org/doc/man/crypto.html#strong_rand_bytes-1
[erl-rand]: https://www.erlang.org/doc/man/rand.html
[erl-crypto-strong-rand-bytes]: https://www.erlang.org/doc/man/crypto.html#strong_rand_bytes-1
[cryptographically-secure-rng]: https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator
[normal-distribution]: https://en.wikipedia.org/wiki/Normal_distribution
[erl-rand-normal-0]: http://www.erlang.org/doc/man/rand.html#normal-0
[erl-rand-normal-2]: http://www.erlang.org/doc/man/rand.html#normal-2
[erl-rand-normal-0]: https://www.erlang.org/doc/man/rand.html#normal-0
[erl-rand-normal-2]: https://www.erlang.org/doc/man/rand.html#normal-2
[prng]: https://en.wikipedia.org/wiki/Pseudorandom_number_generator
[rand-seed-2]: http://www.erlang.org/doc/man/rand.html#seed-2
[rand-seed-2]: https://www.erlang.org/doc/man/rand.html#seed-2
2 changes: 1 addition & 1 deletion concepts/randomness/links.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Documentation: `Enum.random/1`"
},
{
"url": "http://www.erlang.org/doc/man/rand.html",
"url": "https://www.erlang.org/doc/man/rand.html",
"description": "Erlang `rand`"
}
]
2 changes: 1 addition & 1 deletion concepts/typespecs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,5 @@ On the other hand, `string()` is a different type. It's an Erlang string, in Eli
[string-t]: https://hexdocs.pm/elixir/String.html#t:t/0
[enum-t]: https://hexdocs.pm/elixir/Enum.html#t:t/0
[range-t]: https://hexdocs.pm/elixir/Range.html#t:t/0
[dialyzer]: http://www.erlang.org/doc/man/dialyzer.html
[dialyzer]: https://www.erlang.org/doc/man/dialyzer.html
[dialyxir]: https://hexdocs.pm/dialyxir/readme.html
2 changes: 1 addition & 1 deletion docs/INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Installation

Detailed installation instructions can be found at [elixir-lang.org/install](http://elixir-lang.org/install.html).
Detailed installation instructions can be found at [elixir-lang.org/install](https://elixir-lang.org/install.html).

For best learning experience on Exercism, we recommend installing locally the same language versions as are used to run tests on your exercise submissions.
Those versions are **Erlang/OTP 26 and Elixir 1.15**.
Expand Down
6 changes: 3 additions & 3 deletions docs/LEARNING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
We recommend learning Elixir by working through the syllabus and learning exercises on Exercism.
They were designed to teach you Elixir from scratch.

The official [Elixir Getting Started Guide](http://elixir-lang.org/getting-started/introduction.html) is also an excellent place to start.
The official [Elixir Getting Started Guide](https://elixir-lang.org/getting-started/introduction.html) is also an excellent place to start.

## Additional learning resources

* [Elixir Getting Started Guide](http://elixir-lang.org/getting-started/introduction.html)
* [Elixir Getting Started Guide](https://elixir-lang.org/getting-started/introduction.html)
* [Elixir Documentation](https://hexdocs.pm/elixir/)
* [Programming Elixir](https://pragprog.com/titles/elixir16/programming-elixir-1-6/), by Dave Thomas
* [Elixir in Action](https://www.manning.com/books/elixir-in-action-second-edition), by Saša Jurić
* [StackOverflow](http://stackoverflow.com/questions/tagged/elixir)
* [StackOverflow](https://stackoverflow.com/questions/tagged/elixir)
* [Introducing Elixir](https://www.oreilly.com/library/view/introducing-elixir-2nd/9781491956847/), by Simon St. Laurent, J. David Eisenberg
* [Elixir School](https://elixirschool.com)
* [Joy of Elixir](https://joyofelixir.com/toc.html)
Expand Down
4 changes: 2 additions & 2 deletions docs/RESOURCES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
## Communication channels

* [Elixir Forum](https://elixirforum.com/)
* [Slack](https://elixir-slackin.herokuapp.com/)
* [Slack](https://elixir-lang.slack.com/)
* [Discord](https://discord.gg/elixir)
* [Official #elixir on irc.libera.chat](irc://irc.libera.chat/elixir)

## Elixir Podcasts

- [Thinking Elixir](https://thinkingelixir.com/the-podcast/)
- [Thinking Elixir](https://podcast.thinkingelixir.com/)
- [Elixir Wizards](https://smartlogic.io/podcast/elixir-wizards/)
- [Elixir Mix](https://devchat.tv/elixir-mix/)
- [Elixir Outlaws](https://elixiroutlaws.com/)
Expand Down
4 changes: 2 additions & 2 deletions docs/TESTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ typically follow the `@spec function_name(type1, type2) :: return_type`
format. These are used in Elixir and Erlang as documentation and
in conjunction with a tool called Dialyzer to find type inconsistencies
and possible bugs. For more information see the
[Elixir typespecs guide](http://elixir-lang.org/getting-started/typespecs-and-behaviours.html)
[Elixir typespecs guide](https://elixir-lang.org/getting-started/typespecs-and-behaviours.html)
or the [typespecs documentation](https://hexdocs.pm/elixir/typespecs.html). For
documentation about Dialyzer see [Erlang -- dialyzer](http://www.erlang.org/doc/man/dialyzer.html).
documentation about Dialyzer see [Erlang -- dialyzer](https://www.erlang.org/doc/man/dialyzer.html).

Optionally, you may want to check
the types of your implementation with Dialyzer. There are a couple
Expand Down
4 changes: 2 additions & 2 deletions exercises/concept/captains-log/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
[getting-started-erlang-libraries]: https://elixir-lang.org/getting-started/erlang-libraries.html
[getting-started-formatted-text-output]: https://elixir-lang.org/getting-started/erlang-libraries.html#formatted-text-output
[enum-random]: https://hexdocs.pm/elixir/Enum.html#random/1
[erl-rand-uniform]: http://www.erlang.org/doc/man/rand.html#uniform-0
[erl-io-lib-format]: http://www.erlang.org/doc/man/io_lib.html#format-2
[erl-rand-uniform]: https://www.erlang.org/doc/man/rand.html#uniform-0
[erl-io-lib-format]: https://www.erlang.org/doc/man/io_lib.html#format-2
[to-string]: https://hexdocs.pm/elixir/Kernel.html#to_string/1
2 changes: 1 addition & 1 deletion exercises/concept/captains-log/.docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ The most commonly used Erlang functions that do not have an Elixir equivalent ar

To discover Erlang's standard library, explore the [STDLIB Reference Manual][erl-stdlib-ref].

[erl-stdlib-ref]: http://www.erlang.org/doc/apps/stdlib/index.html
[erl-stdlib-ref]: https://www.erlang.org/doc/apps/stdlib/index.html
2 changes: 1 addition & 1 deletion exercises/concept/log-parser/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
## 1. Identify garbled log lines

- Use the [`r` sigil][sigil-r] to create a regular expression.
- There is [an operator]([match-operator]) that can be used to check a string against a regular expression. There is also a [`Regex` function][regex-match] and a [`String` function][string-match] that can do the same.
- There is [an operator][match-operator] that can be used to check a string against a regular expression. There is also a [`Regex` function][regex-match] and a [`String` function][string-match] that can do the same.
- Don't forget to escape characters that have special meaning in regular expressions.

## 2. Split the log line
Expand Down
2 changes: 1 addition & 1 deletion exercises/concept/paint-by-number/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- Read about [bitstrings][bitstring] in the Getting Started guide.
- Review the documentation for the [bitstring special form][bitstring-form].
- Review [how to convert decimal numbers to binary numbers]([decimal-to-binary-youtube]).
- Review [how to convert decimal numbers to binary numbers][decimal-to-binary-youtube].
- Elixir supports [different ways of writing integers][integer-literal], including binary notation.

## 1. Calculate palette bit size
Expand Down
9 changes: 4 additions & 5 deletions exercises/practice/binary/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Convert a binary number, represented as a string (e.g. '101010'), to its decimal equivalent using first principles.

Implement binary to decimal conversion. Given a binary input
string, your program should produce a decimal output. The
program should handle invalid inputs.
Implement binary to decimal conversion.
Given a binary input string, your program should produce a decimal output.
The program should handle invalid inputs.

## Note

Expand All @@ -15,8 +15,7 @@ program should handle invalid inputs.

Decimal is a base-10 system.

A number 23 in base 10 notation can be understood
as a linear combination of powers of 10:
A number 23 in base 10 notation can be understood as a linear combination of powers of 10:

- The rightmost digit gets multiplied by 10^0 = 1
- The next number gets multiplied by 10^1 = 10
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/binary/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
},
"blurb": "Convert a binary number, represented as a string (e.g. '101010'), to its decimal equivalent using first principles.",
"source": "All of Computer Science",
"source_url": "http://www.wolframalpha.com/input/?i=binary&a=*C.binary-_*MathWorld-"
"source_url": "https://www.wolframalpha.com/examples/mathematics/numbers/base-conversions"
}
2 changes: 1 addition & 1 deletion exercises/practice/hexadecimal/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
},
"blurb": "Convert a hexadecimal number, represented as a string (e.g. \"10af8c\"), to its decimal equivalent using first principles (i.e. no, you may not use built-in or external libraries to accomplish the conversion).",
"source": "All of Computer Science",
"source_url": "http://www.wolframalpha.com/examples/NumberBases.html"
"source_url": "https://www.wolframalpha.com/examples/mathematics/numbers/base-conversions"
}
2 changes: 1 addition & 1 deletion exercises/practice/secret-handshake/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
},
"blurb": "Given a decimal number, convert it to the appropriate sequence of events for a secret handshake.",
"source": "Bert, in Mary Poppins",
"source_url": "https://www.imdb.com/title/tt0058331/quotes/qt0437047"
"source_url": "https://www.imdb.com/title/tt0058331/quotes/?item=qt0437047"
}
Loading