-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add lychee for links checking (#18)
# 📥 Pull Request ## ❓ What are you trying to address This pull request includes several changes aimed at enhancing link checking, updating documentation URLs, and adding new tasks to the `Taskfile.yml`. ## ✨ Description of new changes ### Enhancements to Link Checking: * [`.github/linters/.lychee.toml`](diffhunk://#diff-d53c9e019d73fc3bda93f75a4b570fbe903dc96ecd9323994e69f5afb1b769ecR1-R60): Added a new configuration file for the `lychee` link checker to enable caching, set runtime parameters, customize request headers, and exclude certain IP ranges from checking. * [`Taskfile.yml`](diffhunk://#diff-cd2d359855d0301ce190f1ec3b4c572ea690c83747f6df61c9340720e3d2425eR115-R119): Added a new task `lint:links` to run the `lychee` link checker using the new configuration file. * [`Taskfile.yml`](diffhunk://#diff-cd2d359855d0301ce190f1ec3b4c572ea690c83747f6df61c9340720e3d2425eR510-R519): Added a new task `install:lychee` to install the `lychee` link checker on different platforms (Windows, Linux, macOS). ### Documentation Updates: * [`docs/data-sources/sql_endpoints.md`](diffhunk://#diff-904fe1b73249f39b87ee39717d940ffb8d00c90b68492672b1fbe2a8deb6c37dL7-R15): Updated URLs to point to the correct Microsoft documentation for SQL Endpoints. * [`internal/services/sqlendpoint/base.go`](diffhunk://#diff-a9c55265911b97ea793122858cedc6ff408fb66e30d5f75e8e01840332b601d5L19-R19): Updated the `ItemDocsURL` constant to reflect the new URL for SQL Endpoints documentation. ### Minor Fixes: * [`DEVELOPER.md`](diffhunk://#diff-35ea617bfbf0780bfbc554348314c5b11ba478a4d98fd92d33d45cdd54bf326aL362-R362): Fixed a relative link to the `ghpages.yml` GitHub workflow.
- Loading branch information
1 parent
d666361
commit a5c7944
Showing
6 changed files
with
80 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# https://lychee.cli.rs/#/usage/config | ||
# Example config: https://github.com/lycheeverse/lychee/blob/master/lychee.example.toml | ||
|
||
|
||
############################# Cache ############################### | ||
|
||
# Enable link caching. This can be helpful to avoid checking the same links on multiple runs. | ||
cache = true | ||
|
||
# Discard all cached requests older than this duration. | ||
max_cache_age = "1d" | ||
|
||
############################# Runtime ############################# | ||
|
||
# Maximum number of allowed redirects. | ||
max_redirects = 6 | ||
|
||
# Maximum number of allowed retries before a link is declared dead. | ||
max_retries = 2 | ||
|
||
# Maximum number of concurrent link checks. | ||
# max_concurrency = 2 | ||
|
||
############################# Requests ############################ | ||
|
||
# User agent to send with each request. | ||
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0" | ||
|
||
# Website timeout from connect to response finished. | ||
timeout = 45 | ||
|
||
# Minimum wait time in seconds between retries of failed requests. | ||
retry_wait_time = 2 | ||
|
||
# Comma-separated list of accepted status codes for valid links. | ||
accept = ["200", "206", "301", "429"] | ||
|
||
# Only test links with the given schemes (e.g. https). | ||
# Omit to check links with any scheme. | ||
scheme = ["https", "http", "file"] | ||
|
||
# Custom request headers | ||
headers = ['Accept-Encoding: deflate, compress, gzip, br, zstd'] | ||
|
||
############################# Exclusions ########################## | ||
|
||
# Ignore case of paths when matching glob patterns. | ||
glob_ignore_case = true | ||
|
||
# Exclude all private IPs from checking. | ||
exclude_all_private = true | ||
|
||
# Exclude private IP address ranges from checking. | ||
exclude_private = true | ||
|
||
# Exclude link-local IP address range from checking. | ||
exclude_link_local = true | ||
|
||
# Exclude loopback IP address range and localhost from checking. | ||
exclude_loopback = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ testresults.xml | |
golangci-report.xml | ||
.wellknown.json | ||
changie.md | ||
.lycheecache | ||
|
||
# Terraform | ||
.terraform/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters