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
19 changes: 19 additions & 0 deletions src/api/json/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -4328,6 +4328,15 @@
"1.6": "https://www.schemastore.org/mkdocs-1.6.json"
}
},
{
"name": "ModuleAssembler",
"description": "ModuleAssembler configuration file",
"fileMatch": ["**/.moduleassembler/moduleproject.json"],
"url": "https://raw.githubusercontent.com/ModuleAssembler/ModuleAssembler-Schema/refs/tags/v1.0.0/schema/moduleassembler.schema.json",
"versions": {
"1.0.0": "https://raw.githubusercontent.com/ModuleAssembler/ModuleAssembler-Schema/refs/tags/v1.0.0/schema/moduleassembler.schema.json"
}
},
{
"name": "mrdocs.yml",
"description": "MrDocs configuration file",
Expand Down Expand Up @@ -9576,6 +9585,16 @@
"versions": {
"1.0": "https://schema.agentcore.aws.dev/v1/agentcore.json"
}
},
{
"name": "Ethereum ERC721",
"description": "ERC-721 Non-Fungible Token Standard",
"url": "https://www.schemastore.org/ethereum-erc721.json"
},
{
"name": "Ethereum ERC1155",
"description": "ERC-1155 Multi Token Standard",
"url": "https://www.schemastore.org/ethereum-erc1155.json"
}
]
}
33 changes: 33 additions & 0 deletions src/schemas/json/clangd.json
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,16 @@
"All the code snippets and patterns are suggested.",
"None of the code snippets and patterns are suggested."
]
},
"MacroFilter": {
"description": "Controls whether exact or fuzzy matching is used to decide which macro symbols to offer during code completion.\nhttps://clangd.llvm.org/config.html#macrofilter",
"type": "string",
"default": "ExactPrefix",
"enum": ["ExactPrefix", "FuzzyMatch"],
"enumDescriptions": [
"Only suggest macros whose names are an exact prefix match for the token before the cursor when code completion is invoked.",
"Include macro suggestions whose names are a fuzzy match for the token before the cursor, similar to non-macro symbols. Macros whose name starts or ends with an underscore are still excluded from fuzzy match results, to avoid noise (e.g. system headers define many such macros)"
]
}
},
"additionalProperties": false
Expand Down Expand Up @@ -743,6 +753,11 @@
"ShowAKA": {
"description": "Whether to display desugared types\nhttps://clangd.llvm.org/config.html#showaka",
"type": "boolean"
},
"MacroContentsLimit": {
"description": "Character limit for hovered macro expansions. Expansions that would be longer are not shown.\nhttps://clangd.llvm.org/config.html#macrocontentslimit",
"type": "number",
"default": 2048
}
},
"additionalProperties": false
Expand All @@ -769,6 +784,24 @@
}
}
}
},
"Documentation": {
"description": "Specify server side documentation code comment interpretation. Affects the format of the documentation string sent to the client for hover and code completions.\nhttps://clangd.llvm.org/config.html#documentation",
"type": "object",
"additionalProperties": false,
"properties": {
"CommentFormat": {
"description": "Determines the comment format of code documentation.\nhttps://clangd.llvm.org/config.html#commentformat",
"type": "string",
"default": "Plaintext",
"enum": ["Plaintext", "Markdown", "Doxygen"],
"enumDescriptions": [
"Interpret code documentation as plain text. Markdown specific syntax will be escaped. On clients supporting markdown, this will result in showing markdown syntax without rendering. E.g. using **bold text** in the documentation comment will be shown as **bold text** and not as bold text in the hover/code completion.",
"Interpret documentation comments as markdown. Markdown syntax will not be escaped, except for HTML tags. On clients supporting markdown, this will result in rendering all markdown syntax.",
"Interpret code documentation as doxygen comments. In addition to treating the documentation as markdown, this will parse the documentation with Clang’s doxygen parser. It will highlight used doxygen commands, convert doxygen commands to markdown syntax and extend hover content with e.g. function parameter or return documentation."
]
}
}
}
},
"type": "object"
Expand Down
46 changes: 46 additions & 0 deletions src/schemas/json/ethereum-erc1155.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/ethereum-erc1155.json",
"title": "ERC1155 Metadata",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Identifies the asset to which this token represents"
},
"decimals": {
"type": "integer",
"description": "The number of decimal places that the token amount should display - e.g. 18, means to divide the token amount by 1000000000000000000 to get its user representation."
},
"description": {
"type": "string",
"description": "Describes the asset to which this token represents"
},
"image": {
"type": "string",
"description": "A URI pointing to a resource with mime type image/* representing the asset to which this token represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive."
},
"properties": {
"type": "object",
"description": "Arbitrary properties. Values may be strings, numbers, object or arrays."
},
"localization": {
"type": "object",
"required": ["uri", "default", "locales"],
"properties": {
"uri": {
"type": "string",
"description": "The URI pattern to fetch localized data from. This URI should contain the substring `{locale}` which will be replaced with the appropriate locale value before sending the request."
},
"default": {
"type": "string",
"description": "The locale of the default data within the base JSON"
},
"locales": {
"type": "array",
"description": "The list of locales for which data is available. These locales should conform to those defined in the Unicode Common Locale Data Repository (http://cldr.unicode.org/)."
}
}
}
}
}
20 changes: 20 additions & 0 deletions src/schemas/json/ethereum-erc721.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/ethereum-erc721.json",
"title": "ERC721 Metadata",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Identifies the asset to which this NFT represents"
},
"description": {
"type": "string",
"description": "Describes the asset to which this NFT represents"
},
"image": {
"type": "string",
"description": "A URI pointing to a resource with mime type image/* representing the asset to which this NFT represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive."
}
}
}
4 changes: 3 additions & 1 deletion src/schemas/json/pre-commit-hooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"swift",
"pygrep",
"script",
"system"
"system",
"unsupported",
"unsupported_script"
]
},
{
Expand Down
5 changes: 3 additions & 2 deletions src/schemas/json/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@
"target": {
"description": "Set the JavaScript language version for emitted JavaScript and include compatible library declarations.",
"type": ["string", "null"],
"default": "es3",
"default": "es5",
"anyOf": [
{
"enum": [
Expand All @@ -625,11 +625,12 @@
"es2022",
"es2023",
"es2024",
"es2025",
"esnext"
]
},
{
"pattern": "^([Ee][Ss]([356]|(20(1[56789]|2[01234]))|[Nn][Ee][Xx][Tt]))$"
"pattern": "^([Ee][Ss]([356]|(20(1[56789]|2[012345]))|[Nn][Ee][Xx][Tt]))$"
}
],
"markdownDescription": "Set the JavaScript language version for emitted JavaScript and include compatible library declarations.\n\nSee more: https://www.typescriptlang.org/tsconfig#target"
Expand Down
30 changes: 10 additions & 20 deletions src/schemas/json/ty.json
Original file line number Diff line number Diff line change
Expand Up @@ -390,16 +390,6 @@
}
]
},
"byte-string-type-annotation": {
"title": "detects byte strings in type annotation positions",
"description": "## What it does\nChecks for byte-strings in type annotation positions.\n\n## Why is this bad?\nStatic analysis tools like ty can't analyze type annotations that use byte-string notation.\n\n## Examples\n```python\ndef test(): -> b\"int\":\n ...\n```\n\nUse instead:\n```python\ndef test(): -> \"int\":\n ...\n```",
"default": "error",
"oneOf": [
{
"$ref": "#/definitions/Level"
}
]
},
"call-abstract-method": {
"title": "detects calls to abstract methods with trivial bodies on class objects",
"description": "## What it does\nChecks for calls to abstract `@classmethod`s or `@staticmethod`s\nwith \"trivial bodies\" when accessed on the class object itself.\n\n\"Trivial bodies\" are bodies that solely consist of `...`, `pass`,\na docstring, and/or `raise NotImplementedError`.\n\n## Why is this bad?\nAn abstract method with a trivial body has no concrete implementation\nto execute, so calling such a method directly on the class will probably\nnot have the desired effect.\n\nIt is also unsound to call these methods directly on the class. Unlike\nother methods, ty permits abstract methods with trivial bodies to have\nnon-`None` return types even though they always return `None` at runtime.\nThis is because it is expected that these methods will always be\noverridden rather than being called directly. As a result of this\nexception to the normal rule, ty may infer an incorrect type if one of\nthese methods is called directly, which may then mean that type errors\nelsewhere in your code go undetected by ty.\n\nCalling abstract classmethods or staticmethods via `type[X]` is allowed,\nsince the actual runtime type could be a concrete subclass with an implementation.\n\n## Example\n```python\nfrom abc import ABC, abstractmethod\n\nclass Foo(ABC):\n @classmethod\n @abstractmethod\n def method(cls) -> int: ...\n\nFoo.method() # Error: cannot call abstract classmethod\n```",
Expand Down Expand Up @@ -570,16 +560,6 @@
}
]
},
"fstring-type-annotation": {
"title": "detects F-strings in type annotation positions",
"description": "## What it does\nChecks for f-strings in type annotation positions.\n\n## Why is this bad?\nStatic analysis tools like ty can't analyze type annotations that use f-string notation.\n\n## Examples\n```python\ndef test(): -> f\"int\":\n ...\n```\n\nUse instead:\n```python\ndef test(): -> \"int\":\n ...\n```",
"default": "error",
"oneOf": [
{
"$ref": "#/definitions/Level"
}
]
},
"ignore-comment-unknown-rule": {
"title": "detects `ty: ignore` comments that reference unknown rules",
"description": "## What it does\nChecks for `ty: ignore[code]` or `type: ignore[ty:code]` comments where `code` isn't a known lint rule.\n\n## Why is this bad?\nA `ty: ignore[code]` or a `type:ignore[ty:code] directive with a `code` that doesn't match\nany known rule will not suppress any type errors, and is probably a mistake.\n\n## Examples\n```py\na = 20 / 0 # ty: ignore[division-by-zer]\n```\n\nUse instead:\n\n```py\na = 20 / 0 # ty: ignore[division-by-zero]\n```",
Expand Down Expand Up @@ -1060,6 +1040,16 @@
}
]
},
"invalid-typed-dict-field": {
"title": "detects invalid `TypedDict` field declarations",
"description": "## What it does\nDetects invalid `TypedDict` field declarations.\n\n## Why is this bad?\n`TypedDict` subclasses cannot redefine inherited fields incompatibly. Doing so breaks the\nsubtype guarantees that `TypedDict` inheritance is meant to preserve.\n\n## Example\n```python\nfrom typing import TypedDict\n\nclass Base(TypedDict):\n x: int\n\nclass Child(Base):\n x: str # error: [invalid-typed-dict-field]\n```",
"default": "error",
"oneOf": [
{
"$ref": "#/definitions/Level"
}
]
},
"invalid-typed-dict-header": {
"title": "detects invalid statements in `TypedDict` class headers",
"description": "## What it does\nDetects errors in `TypedDict` class headers, such as unexpected arguments\nor invalid base classes.\n\n## Why is this bad?\nThe typing spec states that `TypedDict`s are not permitted to have\ncustom metaclasses. Using `**` unpacking in a `TypedDict` header\nis also prohibited by ty, as it means that ty cannot statically determine\nwhether keys in the `TypedDict` are intended to be required or optional.\n\n## Example\n```python\nfrom typing import TypedDict\n\nclass Foo(TypedDict, metaclass=whatever): # error: [invalid-typed-dict-header]\n ...\n\ndef f(x: dict):\n class Bar(TypedDict, **x): # error: [invalid-typed-dict-header]\n ...\n```",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"description": "Each token represents a unique Ad space in the city.",
"localization": {
"default": "en",
"locales": ["en", "es", "fr"],
"uri": "ipfs://QmWS1VAdMD353A6SDk9wNyvkT14kyCiZrNDYAad4w1tKqT/{locale}.json"
},
"name": "Advertising Space"
}
24 changes: 24 additions & 0 deletions src/test/ethereum-erc1155/ethereum-erc1155.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"description": "Lorem ipsum...",
"image": "https:\/\/s3.amazonaws.com\/your-bucket\/images\/{id}.png",
"name": "Asset Name",
"properties": {
"array_property": {
"class": "emphasis",
"name": "Name",
"value": [1, 2, 3, 4]
},
"rich_property": {
"class": "emphasis",
"css": {
"color": "#ffffff",
"font-weight": "bold",
"text-decoration": "underline"
},
"display_value": "123 Example Value",
"name": "Name",
"value": "123"
},
"simple_property": "example value"
}
}
5 changes: 5 additions & 0 deletions src/test/ethereum-erc721/ethereum-erc721.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"description": "Lorem ipsum...",
"image": "https:\/\/s3.amazonaws.com\/your-bucket\/images\/{id}.png",
"name": "Asset Name"
}
12 changes: 12 additions & 0 deletions src/test/pre-commit-config/pre-commit-config-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,18 @@
"id": "display-python-version",
"language": "python",
"name": "Prints python version"
},
{
"entry": "some-system-hook",
"id": "system-hook",
"language": "unsupported",
"name": "System hook"
},
{
"entry": "some-script-hook",
"id": "script-hook",
"language": "unsupported_script",
"name": "Script hook"
}
],
"repo": "local"
Expand Down
12 changes: 12 additions & 0 deletions src/test/pre-commit-hooks/pre-commit-hooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,17 @@
"id": "bar",
"language": "rust",
"name": "bar"
},
{
"entry": "baz_hook",
"id": "baz",
"language": "unsupported",
"name": "baz"
},
{
"entry": "qux_hook",
"id": "qux",
"language": "unsupported_script",
"name": "qux"
}
]