-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
1,390 additions
and
143 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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/update-checks-doc |
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,68 @@ | ||
update-checks-doc | ||
================= | ||
|
||
This is a script to maintain [the 'Checks' document](../../docs/checks.md). | ||
|
||
This script does: | ||
|
||
- update the outputs of the example inputs; the code blocks after `Output:` header | ||
- update the links to the [playground](https://rhysd.github.io/actionlint/) for the example inputs | ||
|
||
For making the implementation simple, this script does not support Windows. Please run this script | ||
on Linux or macOS. | ||
|
||
## Usage | ||
|
||
Update the document. This command directly modifies the file. | ||
|
||
```sh | ||
go run ./scripts/update-checks-doc ./docs/checks.md | ||
``` | ||
|
||
Check the document is up-to-date. | ||
|
||
```sh | ||
go run ./scripts/update-checks-doc -check ./docs/checks.md | ||
``` | ||
|
||
The check is run on the [CI workflow](../../.github/workflows/ci.yaml). | ||
|
||
## Format | ||
|
||
The format of the check document is: | ||
|
||
````markdown | ||
<a id="some-id"></a> | ||
## This is title of the check | ||
|
||
Example input: | ||
|
||
```yaml | ||
This section is referred to generate the output and the playground link | ||
``` | ||
|
||
Output: | ||
|
||
``` | ||
This section will be auto-generated | ||
``` | ||
|
||
[Playground](https://rhysd.github.io/actionlint/#THIS_HASH_PART_WILL_BE_AUTO_GENERATED) | ||
|
||
Explanation for the check... | ||
```` | ||
|
||
When you don't want to update the output by this script, put the comment as follows. This script | ||
will ignore the code block. Instead you need to write the output in the code blcok manually. | ||
|
||
```yaml | ||
Output: | ||
<!-- Skip update output --> | ||
``` | ||
|
||
When you don't want to put a playground link for your example input, put the comment as follows | ||
instead of the link. This script will not generate the hash for the playground link. | ||
|
||
```yaml | ||
<!-- Skip playground link --> | ||
``` |
Oops, something went wrong.