Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ repos:
args:
[
'--ignore-words-list',
'crate,ninjs,ans,specif,seh,specifid,deriver,isnt,tye,forin,dependees,rouge,interm,fo,wast,nome,statics,ue,aack,gost,inout,provId,handels,bu,testng,ags,edn,aks,te,decorder,provid,branche,alse,nd,mape,wil,clude,wit,flate,omlet,THIRDPARTY,NotIn,notIn,CopyIn,Requestor,requestor,re-use,ofo,abl,dout,foto,vor,wel,NAM,BRIN,everyTime,afterAll,beforeAll,ontainer',
'crate,ninjs,ans,specif,seh,specifid,deriver,isnt,tye,forin,dependees,rouge,interm,fo,wast,nome,statics,ue,aack,gost,inout,provId,handels,bu,testng,ags,edn,aks,te,decorder,provid,branche,alse,nd,mape,wil,clude,wit,flate,omlet,THIRDPARTY,NotIn,notIn,CopyIn,Requestor,requestor,re-use,ofo,abl,dout,foto,vor,wel,NAM,BRIN,everyTime,afterAll,beforeAll,ontainer,mis-match',
]
18 changes: 18 additions & 0 deletions src/api/json/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,12 @@
"fileMatch": ["buf.plugin.yaml"],
"url": "https://www.schemastore.org/buf.plugin.json"
},
{
"name": "buf.policy.yaml",
"description": "buf.policy.yaml defines a policy containing lint, breaking change detection, and plugin configuration that can be shared across BSR modules",
"fileMatch": ["buf.policy.yaml"],
"url": "https://www.schemastore.org/buf.policy.json"
},
{
"name": "buf.work.yaml",
"description": "buf.work.yaml is used to define a workspace, which is an advanced local development feature. Workspaces make it possible to consolidate one or more modules into a single buildable unit. They also allow users to run buf operations across multiple modules with a single execution (such as buf lint)",
Expand Down Expand Up @@ -9619,6 +9625,18 @@
"description": "Configuration file for Qwen Code",
"fileMatch": ["**/.qwen/settings.json"],
"url": "https://www.schemastore.org/qwen-code-settings.json"
},
{
"name": "Raid Profile",
"description": "Definition for one or more Raid Profiles",
"fileMatch": ["*.raid.yaml", "*.raid.yml", "*.raid.json"],
"url": "https://raw.githubusercontent.com/8bitAlex/raid/main/schemas/raid-profile.schema.json"
},
{
"name": "Raid Repo Configuration",
"description": "Definition for a single repository",
"fileMatch": ["raid.yaml", "raid.yml", "raid.json"],
"url": "https://raw.githubusercontent.com/8bitAlex/raid/main/schemas/raid-repo.schema.json"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# yaml-language-server: $schema=../../schemas/json/buf.gen.json
version: v1
plugins:
- plugin: go
out: gen/go
blargh: whatever
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# yaml-language-server: $schema=../../schemas/json/buf.gen.json
version: v2
plugins:
- local: go
out: gen/go
blargh: whatever
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# yaml-language-server: $schema=../../schemas/json/buf.policy.json
version: v2
blargh: whatever
5 changes: 5 additions & 0 deletions src/negative_test/buf.policy/buf.policy.wrong-version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# yaml-language-server: $schema=../../schemas/json/buf.policy.json
version: v1
lint:
use:
- STANDARD
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# yaml-language-server: $schema=../../schemas/json/buf.work.json
version: v1
directories:
- proto
blargh: whatever
3 changes: 3 additions & 0 deletions src/negative_test/buf/buf.unknown-top-level-key.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# yaml-language-server: $schema=../../schemas/json/buf.json
version: v1
blargh: whatever
3 changes: 3 additions & 0 deletions src/negative_test/buf/buf.v2.unknown-top-level-key.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# yaml-language-server: $schema=../../schemas/json/buf.json
version: v2
blargh: whatever
29 changes: 17 additions & 12 deletions src/schemas/json/buf.gen.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,15 @@
"if": {
"properties": {
"version": {
"const": "v1"
"enum": ["v1", "v1beta1"]
}
}
},
"then": {
"required": ["version", "plugins"],
"additionalProperties": false,
"properties": {
"version": {},
"plugins": {
"$comment": "https://buf.build/docs/configuration/v1/buf-gen-yaml#plugins",
"description": "Required. Each entry in the plugins key is a protoc plugin configuration. Plugins are invoked in parallel and their outputs are written in the order you specify here.",
Expand Down Expand Up @@ -265,7 +267,7 @@
"additionalProperties": false,
"properties": {
"default": {
"description": "Optional. Overrides managed mode's default value for the class prefix.",
"description": "Required if the objc_class_prefix key is set. Overrides managed mode's default value for the class prefix.",
"type": "string"
},
"except": {
Expand Down Expand Up @@ -391,7 +393,10 @@
},
"else": {
"$comment": "v2 properties",
"required": ["version", "plugins"],
"additionalProperties": false,
"properties": {
"version": {},
"clean": {
"$comment": "https://buf.build/docs/configuration/v2/buf-gen-yaml#clean",
"description": "Optional. When set to true, buf generate deletes all directories, zip files, and/or jar files specified by the out field for each plugin before running code generation.",
Expand Down Expand Up @@ -576,7 +581,7 @@
{
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"required": ["directory"],
"properties": {
"types": {
"$ref": "#/$defs/types"
Expand All @@ -599,7 +604,7 @@
{
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"required": ["module"],
"properties": {
"types": {
"$ref": "#/$defs/types"
Expand Down Expand Up @@ -627,7 +632,7 @@
{
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"required": ["git_repo"],
"properties": {
"types": {
"$ref": "#/$defs/types"
Expand Down Expand Up @@ -675,7 +680,7 @@
{
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"required": ["tarball"],
"properties": {
"types": {
"$ref": "#/$defs/types"
Expand Down Expand Up @@ -711,7 +716,7 @@
{
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"required": ["zip_archive"],
"properties": {
"types": {
"$ref": "#/$defs/types"
Expand Down Expand Up @@ -742,7 +747,7 @@
{
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"required": ["proto_file"],
"properties": {
"types": {
"type": "array",
Expand Down Expand Up @@ -785,7 +790,7 @@
{
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"required": ["binary_image"],
"properties": {
"types": {
"$ref": "#/$defs/types"
Expand Down Expand Up @@ -813,7 +818,7 @@
{
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"required": ["json_image"],
"properties": {
"types": {
"$ref": "#/$defs/types"
Expand Down Expand Up @@ -841,7 +846,7 @@
{
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"required": ["yaml_image"],
"properties": {
"types": {
"$ref": "#/$defs/types"
Expand Down Expand Up @@ -869,7 +874,7 @@
{
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"required": ["txt_image"],
"properties": {
"types": {
"$ref": "#/$defs/types"
Expand Down
77 changes: 73 additions & 4 deletions src/schemas/json/buf.json
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,6 @@
"$comment": "https://buf.build/docs/configuration/v2/buf-yaml#lint",
"description": "Optional. The lint settings you specify in this section are the default for all modules in the workspace, but can be replaced for individual modules by specifying different settings at the module level. Module-level settings have all of the same fields and behavior as workspace-level settings. If no lint settings are specified for the workspace, it uses the default settings.",
"type": "object",
"additionalProperties": false,
"properties": {
"use": {
"$comment": "https://buf.build/docs/configuration/v2/buf-yaml#use",
Expand Down Expand Up @@ -969,14 +968,19 @@
"description": "Optional. Controls the behavior of the SERVICE_SUFFIX lint rule. By default, this rule verifies that all service names are suffixed with Service.",
"type": "string",
"default": "Service"
},
"disable_builtin": {
"$comment": "https://buf.build/docs/configuration/v2/buf-yaml#disable_builtin",
"description": "Optional. Disables Buf's built-in lint rules when set to true. Defaults to false.",
"type": "boolean",
"default": false
}
}
},
"v2-breaking": {
"$comment": "https://buf.build/docs/configuration/v2/buf-yaml#breaking",
"description": "Optional. Specifies the breaking change detection rules enforced on the Protobuf files in the directory.",
"type": "object",
"additionalProperties": false,
"properties": {
"use": {
"$comment": "https://buf.build/docs/configuration/v2/buf-yaml#use-1",
Expand Down Expand Up @@ -1010,6 +1014,12 @@
"$comment": "https://buf.build/docs/configuration/v2/buf-yaml#ignore_unstable_packages",
"description": "Optional. Ignores packages with a last component that's one of the unstable forms recognized by the Buf linter's PACKAGE_VERSION_SUFFIX rule.",
"type": "boolean"
},
"disable_builtin": {
"$comment": "https://buf.build/docs/configuration/v2/buf-yaml#disable_builtin-1",
"description": "Optional. Disables Buf's built-in breaking change detection rules when set to true. Defaults to false.",
"type": "boolean",
"default": false
}
}
}
Expand All @@ -1028,12 +1038,14 @@
"if": {
"properties": {
"version": {
"const": "v1"
"enum": ["v1", "v1beta1"]
}
}
},
"then": {
"additionalProperties": false,
"properties": {
"version": {},
"name": {
"$comment": "https://buf.build/docs/configuration/v1/buf-yaml#name",
"description": "The name is optional, and uniquely identifies your module. The name must be a valid module name and is directly associated with the repository that owns it.",
Expand Down Expand Up @@ -1177,14 +1189,15 @@
},
"else": {
"$comment": "v2 properties",
"additionalProperties": false,
"properties": {
"version": {},
"modules": {
"$comment": "https://buf.build/docs/configuration/v2/buf-yaml#modules",
"description": "Required. Defines the list of modules that will be built together in this workspace. Any dependencies that the files have on each other are automatically taken into account when building and shouldn't be declared in the deps section.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"path": {
"$comment": "https://buf.build/docs/configuration/v2/buf-yaml#path",
Expand Down Expand Up @@ -1234,6 +1247,62 @@
},
"breaking": {
"$ref": "#/$defs/v2-breaking"
},
"plugins": {
"$comment": "https://buf.build/docs/configuration/v2/buf-yaml#plugins",
"description": "Optional. Custom lint or breaking change rule plugins applied across all modules in the workspace.",
"type": "array",
"items": {
"type": "object",
"required": ["plugin"],
"properties": {
"plugin": {
"$comment": "https://buf.build/docs/configuration/v2/buf-yaml#plugin",
"description": "Required. Path to a plugin binary or remote BSR plugin reference.",
"type": "string"
},
"options": {
"$comment": "https://buf.build/docs/configuration/v2/buf-yaml#options",
"description": "Optional. Key-value configuration pairs for plugin customization.",
"type": "object"
}
}
}
},
"policies": {
"$comment": "https://buf.build/docs/configuration/v2/buf-yaml#policies",
"description": "Optional. YAML-based rule sets shareable across workspaces. Each entry references a local buf.policy.yaml file or a remote BSR policy.",
"type": "array",
"items": {
"type": "object",
"required": ["policy"],
"properties": {
"policy": {
"$comment": "https://buf.build/docs/configuration/v2/buf-yaml#policy",
"description": "Required. Local file path or BSR policy reference.",
"type": "string"
},
"ignore": {
"$comment": "https://buf.build/docs/configuration/v2/buf-yaml#ignore-2",
"description": "Optional. Files or directories excluded from all rules in this policy. Paths must be relative to the buf.yaml file.",
"type": "array",
"items": {
"type": "string"
}
},
"ignore_only": {
"$comment": "https://buf.build/docs/configuration/v2/buf-yaml#ignore_only-2",
"description": "Optional. Excludes specific policy rules for certain paths. Keys are rule IDs; values are arrays of paths relative to the buf.yaml file.",
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
Expand Down
Loading