Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: yaml-lang-server modelines in init config #3376

Merged
merged 2 commits into from Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .goreleaser.yaml
Expand Up @@ -318,3 +318,8 @@ announce:
discord:
enabled: true
message_template: 'GoReleaser {{ .Tag }} is out! Check it out: https://github.com/goreleaser/goreleaser/releases/tag/{{ .Tag }}'


# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=jcroql

4 changes: 4 additions & 0 deletions internal/static/config.go
Expand Up @@ -36,4 +36,8 @@ changelog:
exclude:
- '^docs:'
- '^test:'

# modelines, feel free to remove those if you don't want/use them:
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
`
12 changes: 12 additions & 0 deletions www/docs/customization/index.md
Expand Up @@ -15,11 +15,23 @@ GoReleaser also has a [jsonschema][] file which you can use to have better edito
https://goreleaser.com/static/schema.json
```

You can also specify it in your `.goreleaser.yml` config file by adding a
comment like the following:
```yaml
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
```

=== "Pro"
```sh
https://goreleaser.com/static/schema-pro.json
```

You can also specify it in your `.goreleaser.yml` config file by adding a
comment like the following:
```yaml
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
```

You can also generate it for your specific version using the [`goreleaser jsonschema`][schema] command.

[jsonschema]: http://json-schema.org/draft/2020-12/json-schema-validation.html
Expand Down