Skip to content

Commit e2c795c

Browse files
authored
Merge pull request #10680 from Calinou/ci-check-urls
GitHub Actions: Check URLs using lychee
2 parents b884bfe + 51a597f commit e2c795c

File tree

3 files changed

+79
-11
lines changed

3 files changed

+79
-11
lines changed

.github/workflows/check_urls.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: 🌐 Check URLs
2+
on:
3+
push:
4+
pull_request:
5+
schedule:
6+
# Every day at 18:00 UTC.
7+
# URLs can decay over time. Setting up a schedule makes it possible to be warned
8+
# about dead links as soon as possible.
9+
- cron: "0 18 * * *"
10+
11+
jobs:
12+
check-urls:
13+
runs-on: ubuntu-24.04
14+
steps:
15+
16+
- uses: actions/checkout@v4
17+
18+
- name: Restore lychee cache
19+
uses: actions/cache@v4
20+
with:
21+
path: .lycheecache
22+
key: cache-lychee-${{ github.sha }}
23+
restore-keys: cache-lychee-
24+
25+
- name: Run lychee
26+
uses: lycheeverse/lychee-action@v2
27+
with:
28+
args: >
29+
--base .
30+
--no-progress
31+
--cache
32+
--max-cache-age 1d
33+
--exclude-path _templates/
34+
--exclude-path classes/
35+
"**/*.md" "**/*.html" "**/*.rst"
36+
37+
- name: Fail if there were link errors
38+
run: exit ${{ steps.lc.outputs.exit_code }}

.lycheeignore

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Don't read Godot's own URL schemes as web URLs.
2+
user:\/\/.*
3+
res:\/\/.*
4+
uid:\/\/.*
5+
6+
# Don't read WebSockets or TCP URLs as web URLs.
7+
ws(s?):\/\/.*
8+
tcp:\/\/.*
9+
10+
# Security checks prevent checking the URLs of these websites automatically,
11+
# typically returning 403 errors.
12+
.*asecuritysite\.com.*
13+
.*intel\.com.*
14+
.*reddit\.com.*
15+
16+
# Don't check URLs from these websites due to frequent rate limits (error 429) or timeouts.
17+
.*adobe\.com.*
18+
.*gamedevartisan\.com.*
19+
.*github\.com.*
20+
.*gnu\.org.*
21+
.*loopit\.dk.*
22+
.*meta\.com.*
23+
.*sourceforge\.io.*
24+
25+
# Not a valid URL with the GET method, which lychee always sends.
26+
# Mentioned in the class reference.
27+
.*httpbin\.org\/post
28+
29+
# Class reference mentions `example.com/index.php` in an example, which is 404.
30+
.*example\.com.*

tutorials/shaders/shader_reference/shader_functions.rst

+11-11
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ Trigonometric function descriptions
287287

288288
:return:
289289
The angle whose trigonometric cosine is ``x``.
290-
290+
291291
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/acos.xhtml
292292

293293
.. rst-class:: classref-item-separator
@@ -795,7 +795,7 @@ Exponential and math function descriptions
795795

796796
|componentwise|
797797

798-
Returns the absolute value of ``x``. Returns ``x`` if ``x`` is positive, otherwise returns ``-1 * x``.
798+
Returns the absolute value of ``x``. Returns ``x`` if ``x`` is positive, otherwise returns ``-1 * x``.
799799

800800
:param x:
801801
The value of which to return the absolute.
@@ -872,7 +872,7 @@ Exponential and math function descriptions
872872

873873
.. note::
874874
Rounding of values with a fractional part of ``0.5`` is implementation-dependent.
875-
This includes the possibility that ``round(x)`` returns the same value as
875+
This includes the possibility that ``round(x)`` returns the same value as
876876
``roundEven(x)``for all values of ``x``.
877877

878878
:param x:
@@ -2911,7 +2911,7 @@ vec4 **textureGather**\ (\ samplerCube s, vec3 p [, int comps] ) :ref:`🔗<shad
29112911
:return:
29122912
The partial derivative of ``p``.
29132913

2914-
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/dFdxCoarse.xhtml
2914+
https://registry.khronos.org/OpenGL-Refpages/gl4/html/dFdx.xhtml
29152915

29162916
.. rst-class:: classref-item-separator
29172917

@@ -2946,7 +2946,7 @@ vec4 **textureGather**\ (\ samplerCube s, vec3 p [, int comps] ) :ref:`🔗<shad
29462946
:return:
29472947
The partial derivative of ``p``.
29482948

2949-
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/dFdxFine.xhtml
2949+
https://registry.khronos.org/OpenGL-Refpages/gl4/html/dFdx.xhtml
29502950

29512951
.. rst-class:: classref-item-separator
29522952

@@ -2981,7 +2981,7 @@ vec4 **textureGather**\ (\ samplerCube s, vec3 p [, int comps] ) :ref:`🔗<shad
29812981
:return:
29822982
The partial derivative of ``p``.
29832983

2984-
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/dFdy.xhtml
2984+
https://registry.khronos.org/OpenGL-Refpages/gl4/html/dFdx.xhtml
29852985

29862986
.. rst-class:: classref-item-separator
29872987

@@ -3016,7 +3016,7 @@ vec4 **textureGather**\ (\ samplerCube s, vec3 p [, int comps] ) :ref:`🔗<shad
30163016
:return:
30173017
The partial derivative of ``p``.
30183018

3019-
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/dFdyCoarse.xhtml
3019+
https://registry.khronos.org/OpenGL-Refpages/gl4/html/dFdx.xhtml
30203020

30213021
.. rst-class:: classref-item-separator
30223022

@@ -3049,7 +3049,7 @@ vec4 **textureGather**\ (\ samplerCube s, vec3 p [, int comps] ) :ref:`🔗<shad
30493049
:return:
30503050
The partial derivative of ``p``.
30513051

3052-
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/dFdyFine.xhtml
3052+
https://registry.khronos.org/OpenGL-Refpages/gl4/html/dFdx.xhtml
30533053

30543054
.. rst-class:: classref-item-separator
30553055

@@ -3107,7 +3107,7 @@ vec4 **textureGather**\ (\ samplerCube s, vec3 p [, int comps] ) :ref:`🔗<shad
31073107
:return:
31083108
The partial derivative.
31093109

3110-
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/fwidthCoarse.xhtml
3110+
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/fwidth.xhtml
31113111

31123112
.. rst-class:: classref-item-separator
31133113

@@ -3138,7 +3138,7 @@ vec4 **textureGather**\ (\ samplerCube s, vec3 p [, int comps] ) :ref:`🔗<shad
31383138
:return:
31393139
The partial derivative.
31403140

3141-
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/fwidthFine.xhtml
3141+
https://registry.khronos.org/OpenGL-Refpages/gl4/html/fwidth.xhtml
31423142

31433143

31443144
.. rst-class:: classref-section-separator
@@ -3566,7 +3566,7 @@ Bitwise function descriptions
35663566

35673567
.. warning::
35683568
The result will be undefined if:
3569-
3569+
35703570
- offset or bits is negative.
35713571
- if the sum of offset and bits is greater than the number of bits used to store the operand.
35723572

0 commit comments

Comments
 (0)