Skip to content

Commit

Permalink
Squash broken links (#494)
Browse files Browse the repository at this point in the history
* Fix broken link

* Temp disable custom Markdown link checker config to troubleshoot false negatives

* Fix 2 broken links

* Specify MLC v@1.0.13 since the current v1 has many relative link failures

per: gaurav-nelson/github-action-markdown-link-check#127

* Wrap localhost link in ticks

* Allow 429s as alive status code

* Intentionally introduce broken link

* Add missing https to link

* Update mlc config

* Revert "Intentionally introduce broken link"

This reverts commit 6f9d583.

* Go back to checking only modified files instead of the whole project

* Add scheduled link checker to prevent link rot

* Add scheduled link checker to prevent link rot
  • Loading branch information
pabloest committed Apr 8, 2022
1 parent 8850604 commit 03fdb94
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 16 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/markdown-link-check-on-schedule.yml
@@ -0,0 +1,18 @@
name: Check Markdown links

on:
schedule:
- cron: "31 23 * * 4"

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.13
with:
use-quiet-mode: "yes"
use-verbose-mode: "yes"
base-branch: "main"
check-modified-files-only: "no"
config-file: ".mlc_config.json"
14 changes: 8 additions & 6 deletions .github/workflows/markdown-link-check.yml
Expand Up @@ -6,9 +6,11 @@ jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: '.mlc_config.json'
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.13
with:
use-quiet-mode: "yes"
use-verbose-mode: "yes"
base-branch: "main"
check-modified-files-only: "yes"
config-file: ".mlc_config.json"
15 changes: 10 additions & 5 deletions .mlc_config.json
@@ -1,13 +1,18 @@
{
"ignorePatterns": [
{
"pattern": "^http://localhost:"
},
"pattern": "^https*://127.0.0.1"
},
{
"pattern": "^http://127.0.0.1:"
"pattern": "^http://localhost:"
},
{
"pattern": "^https://www.baeldung.com/" // when automated tests hit this, site returns a CAPTCHA
"pattern": "https://gitlab.com/-/*"
}
]
],
"timeout": "20s",
"retryOn429": true,
"retryCount": 2,
"fallbackRetryDelay": "30s",
"aliveStatusCodes": [200, 206, 301, 400, 429]
}
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -18,7 +18,7 @@ Contributions to the docs are welcome! To start contributing, first please make

1. Clone the repo
2. Install: `yarn install`
3. Run the docs locally with `yarn start` and then go to: <http://localhost:3000/>
3. Run the docs locally with `yarn start` and then go to: `<http://localhost:3000/>`

## Build and preview

Expand Down
2 changes: 1 addition & 1 deletion docs/experiments/join-mode/recursive-joins.md
@@ -1,6 +1,6 @@
# Recursive joins

Join mode is an extension of Semgrep that runs multiple rules at once and only returns results if certain conditions are met. Join mode is an experimental mode that enables you to cross file boundaries, allowing you to write rules for whole codebases instead of individual files. More information is available in [Join mode overview](/docs/experiments/join-mode/overview).
Join mode is an extension of Semgrep that runs multiple rules at once and only returns results if certain conditions are met. Join mode is an experimental mode that enables you to cross file boundaries, allowing you to write rules for whole codebases instead of individual files. More information is available in [Join mode overview](./overview/).

Recursive join mode has a recursive operator, `-->`, which executes a recursive query on the given condition. This recursive operator allows you to write a Semgrep rule that effectively crawls the codebase on a condition you specify, letting you build chains such as function call chains or class inheritance chains.

Expand Down
2 changes: 1 addition & 1 deletion docs/experiments/overview.md
Expand Up @@ -75,7 +75,7 @@ rules:

## Generic pattern matching

See [generic pattern matching](../generic-pattern-matching/).
See [generic pattern matching](./generic-pattern-matching/).

## Deprecated experiments

Expand Down
2 changes: 1 addition & 1 deletion docs/ignoring-files-folders-code.md
Expand Up @@ -32,7 +32,7 @@ Without user customization, Semgrep refers to the following to define ignored fi
* Semgrep's default `.semgrepignore` file
* Your repository's `.gitignore` file (if it exists)

In the absence of a user-generated `.semgrepignore`, Semgrep will refer to [its repository's default template](://github.com/returntocorp/semgrep/blob/develop/semgrep/semgrep/templates/.semgrepignore):
In the absence of a user-generated `.semgrepignore`, Semgrep will refer to [its repository's default template](https://github.com/returntocorp/semgrep/blob/develop/semgrep/semgrep/templates/.semgrepignore):

```
DEFAULT_SEMGREPIGNORE_TEXT
Expand Down
2 changes: 1 addition & 1 deletion docs/status.md
Expand Up @@ -103,7 +103,7 @@ The following thresholds define each maturity level:

Visit the cheat sheet generation script and associated semgrep-core test files to learn more about each feature:

* [generation script](https://github.com/returntocorp/semgrep/blob/develop/scripts/generate_test_matrix.py)
* [generation script](https://github.com/returntocorp/semgrep/blob/develop/scripts/generate_cheatsheet.py)
* [semgrep-core test files](https://github.com/returntocorp/semgrep/tree/develop/semgrep-core/tests)
## Language parse rates

Expand Down

0 comments on commit 03fdb94

Please sign in to comment.