Skip to content

Commit 37c743a

Browse files
committed
show each document links in -help output
1 parent 187a0b2 commit 37c743a

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

.github/workflows/codeql.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ jobs:
2929
language: ['go', 'javascript']
3030
steps:
3131
- uses: actions/checkout@v4
32+
- uses: actions/setup-go@v5
33+
with:
34+
go-version: '1.23'
35+
if: ${{ matrix.language == 'go' }}
3236
- uses: github/codeql-action/init@v3
3337
with:
3438
config-file: ./.github/codeql/codeql-config.yaml
3539
languages: ${{ matrix.language }}
3640
- uses: github/codeql-action/autobuild@v3
3741
if: ${{ matrix.language != 'go' }}
38-
- uses: actions/setup-go@v5
39-
with:
40-
go-version: '1.23'
41-
if: ${{ matrix.language == 'go' }}
4242
- name: Build Go sources
4343
run: |
4444
set -x

command.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ func printUsageHeader(out io.Writer) {
5858
5959
Documents:
6060
61-
https://github.com/rhysd/actionlint/tree/%s/docs
61+
- List of checks: https://github.com/rhysd/actionlint/tree/%s/docs/checks.md
62+
- Usage: https://github.com/rhysd/actionlint/tree/%s/docs/usage.md
63+
- Configuration: https://github.com/rhysd/actionlint/tree/%s/docs/config.md
6264
6365
Flags:
64-
`, b)
66+
`, b, b, b)
6567
}
6668

6769
func getCommandVersion() string {
@@ -135,7 +137,7 @@ func (cmd *Command) Main(args []string) int {
135137
flags.StringVar(&opts.Shellcheck, "shellcheck", "shellcheck", "Command name or file path of \"shellcheck\" external command. If empty, shellcheck integration will be disabled")
136138
flags.StringVar(&opts.Pyflakes, "pyflakes", "pyflakes", "Command name or file path of \"pyflakes\" external command. If empty, pyflakes integration will be disabled")
137139
flags.BoolVar(&opts.Oneline, "oneline", false, "Use one line per one error. Useful for reading error messages from programs")
138-
flags.StringVar(&opts.Format, "format", "", "Custom template to format error messages in Go template syntax. See https://github.com/rhysd/actionlint/tree/main/docs/usage.md#format")
140+
flags.StringVar(&opts.Format, "format", "", "Custom template to format error messages in Go template syntax. See the usage documentation for more details")
139141
flags.StringVar(&opts.ConfigFile, "config-file", "", "File path to config file")
140142
flags.BoolVar(&initConfig, "init-config", false, "Generate default config file at .github/actionlint.yaml in current project")
141143
flags.BoolVar(&noColor, "no-color", false, "Disable colorful output")

scripts/bump-version.bash

+5-9
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,12 @@ sed_ "\
6464
" "$usage_doc"
6565

6666
echo "Updating $playground_html"
67-
sed_ "\
68-
s/id=\"version\">v[0-9]+\.[0-9]+\.[0-9]+/id=\"version\">v${version}/; \
69-
s/\/blob\/v[0-9]+\.[0-9]+\.[0-9]+\/docs\/checks\.md/\/blob\/v${version}\/docs\/checks\.md/; \
70-
" "$playground_html"
71-
72-
echo "Updating $readme_doc"
73-
sed_ "s/\/rhysd\/actionlint\/blob\/v[0-9]+\.[0-9]+\.[0-9]+\//\/rhysd\/actionlint\/blob\/v${version}\//g" "$readme_doc"
67+
sed_ "s/id=\"version\">v[0-9]+\.[0-9]+\.[0-9]+/id=\"version\">v${version}/" "$playground_html"
7468

75-
echo "Updating $man_ronn"
76-
sed_ "s/\/rhysd\/actionlint\/blob\/v[0-9]+\.[0-9]+\.[0-9]+\//\/rhysd\/actionlint\/blob\/v${version}\//g" "$man_ronn"
69+
for f in "$readme_doc" "$man_ronn" "$playground_html"; do
70+
echo "Updating document links in $f"
71+
sed_ "s/\/rhysd\/actionlint\/blob\/v[0-9]+\.[0-9]+\.[0-9]+\/docs\//\/rhysd\/actionlint\/blob\/v${version}\/docs\//g" "$f"
72+
done
7773

7874
echo 'Creating a version bump commit and a version tag'
7975
git add "$pre_commit_hook" "$usage_doc" "$playground_html" "$readme_doc" "$man_ronn"

0 commit comments

Comments
 (0)