1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2024-12-27 01:33:39 +02:00

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

- docs on how to specify the schema to the lang server
- add it automatically along with vim modelines to the init config
- added it to our config as well

this should prevent some "out of date" schema issues, as well as mixing
tabs with spaces and whatnot when an editorconfig plugin is not
installed.
This commit is contained in:
Carlos Alexandro Becker 2022-09-15 09:41:26 -03:00 committed by GitHub
parent 89978a2a5c
commit 6606eec326
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 0 deletions

View File

@ -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

View File

@ -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
`

View File

@ -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