Skip to content

Commit

Permalink
show each document links in -help output
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Nov 6, 2024
1 parent 187a0b2 commit 37c743a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ jobs:
language: ['go', 'javascript']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.23'
if: ${{ matrix.language == 'go' }}
- uses: github/codeql-action/init@v3
with:
config-file: ./.github/codeql/codeql-config.yaml
languages: ${{ matrix.language }}
- uses: github/codeql-action/autobuild@v3
if: ${{ matrix.language != 'go' }}
- uses: actions/setup-go@v5
with:
go-version: '1.23'
if: ${{ matrix.language == 'go' }}
- name: Build Go sources
run: |
set -x
Expand Down
8 changes: 5 additions & 3 deletions command.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ func printUsageHeader(out io.Writer) {
Documents:
https://github.com/rhysd/actionlint/tree/%s/docs
- List of checks: https://github.com/rhysd/actionlint/tree/%s/docs/checks.md
- Usage: https://github.com/rhysd/actionlint/tree/%s/docs/usage.md
- Configuration: https://github.com/rhysd/actionlint/tree/%s/docs/config.md
Flags:
`, b)
`, b, b, b)
}

func getCommandVersion() string {
Expand Down Expand Up @@ -135,7 +137,7 @@ func (cmd *Command) Main(args []string) int {
flags.StringVar(&opts.Shellcheck, "shellcheck", "shellcheck", "Command name or file path of \"shellcheck\" external command. If empty, shellcheck integration will be disabled")
flags.StringVar(&opts.Pyflakes, "pyflakes", "pyflakes", "Command name or file path of \"pyflakes\" external command. If empty, pyflakes integration will be disabled")
flags.BoolVar(&opts.Oneline, "oneline", false, "Use one line per one error. Useful for reading error messages from programs")
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")
flags.StringVar(&opts.Format, "format", "", "Custom template to format error messages in Go template syntax. See the usage documentation for more details")
flags.StringVar(&opts.ConfigFile, "config-file", "", "File path to config file")
flags.BoolVar(&initConfig, "init-config", false, "Generate default config file at .github/actionlint.yaml in current project")
flags.BoolVar(&noColor, "no-color", false, "Disable colorful output")
Expand Down
14 changes: 5 additions & 9 deletions scripts/bump-version.bash
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,12 @@ sed_ "\
" "$usage_doc"

echo "Updating $playground_html"
sed_ "\
s/id=\"version\">v[0-9]+\.[0-9]+\.[0-9]+/id=\"version\">v${version}/; \
s/\/blob\/v[0-9]+\.[0-9]+\.[0-9]+\/docs\/checks\.md/\/blob\/v${version}\/docs\/checks\.md/; \
" "$playground_html"

echo "Updating $readme_doc"
sed_ "s/\/rhysd\/actionlint\/blob\/v[0-9]+\.[0-9]+\.[0-9]+\//\/rhysd\/actionlint\/blob\/v${version}\//g" "$readme_doc"
sed_ "s/id=\"version\">v[0-9]+\.[0-9]+\.[0-9]+/id=\"version\">v${version}/" "$playground_html"

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

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

0 comments on commit 37c743a

Please sign in to comment.