-
-
Notifications
You must be signed in to change notification settings - Fork 163
Add JSON Schema #994
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
Open
ShadiestGoat
wants to merge
2
commits into
castwide:master
Choose a base branch
from
ShadiestGoat:add-json-schema
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add JSON Schema #994
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ruby 3.2.0 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| { | ||
| "$schema": "https://json-schema.org/draft-07/schema#", | ||
| "type": "object", | ||
| "properties": { | ||
| "include": { | ||
| "type": "array", | ||
| "items": {"type": "string"}, | ||
| "description": "A list of directory globs to include in Solargraph's code maps. Exclude takes priority over include.", | ||
| "default": ["**/*.rb"] | ||
| }, | ||
| "exclude": { | ||
| "type": "array", | ||
| "items": {"type": "string"}, | ||
| "description": "A list of directory globs to exclude from Solargraph's code maps. Exclude takes priority over include.", | ||
| "default": [ | ||
| "spec/**/*", | ||
| "test/**/*", | ||
| "vendor/**/*", | ||
| ".bundle/**/*" | ||
| ] | ||
| }, | ||
| "require": { | ||
| "type": "array", | ||
| "items": {"type": "string"}, | ||
| "description": "**Note**: Consider adding requires with a YARD @!parse directive instead of using this configuration setting.\nUse require to add require paths that are not explicitly defined in code" | ||
| }, | ||
| "domains": { | ||
| "type": "array", | ||
| "items": {"type": "string"}, | ||
| "description": "Solargraph will use the designated classes and modules as contexts in which the project’s scripts will run. Example: if one of the domains is Class<Sinatra::Base>, the Sinatra DSL will be included in suggestions. (Whether you need to specify the domain inside Class<> depends on how the library is implemented.)" | ||
| }, | ||
| "reporters": { | ||
| "type": "array", | ||
| "items": { | ||
| "anyOf": [ | ||
| { | ||
| "const": "rubocop", | ||
| "description": "Enables RuboCop linting. Its rules can be configured in a `.rubocop.yml` file", | ||
| "title": "RubocCop Reporter" | ||
| }, | ||
| { | ||
| "const": "require_not_found", | ||
| "description": "Highlights `require` calls where Solargraph could not resolve a required path. Note that this error does not necessarily mean that the path is incorrect; only that Solargraph was unable to recognize it", | ||
| "title": "Unresolved Require Reporter" | ||
| }, | ||
| { | ||
| "title": "Typecheck Reporter", | ||
| "oneOf": [ | ||
| { | ||
| "enum": ["typecheck", "typecheck:normal"], | ||
| "description": "Normal Typecheck Level\n - @return and @param tags are optional\n - Validate arity of calls to explicit methods\n - Resolve namespaces in all type tags\n - Ignore all undefined types\n\nNormal checks validate YARD type tags, but do not perform type inference on the code. Untagged types are ignored" | ||
| }, | ||
| { | ||
| "const": "typecheck:typed", | ||
| "description": "Typed Typecheck Level:\n - @return and @param tags are optional\n - Validate arity of calls to explicit methods\n - Resolve namespaces in all type tags\n - Validate existing @return tags against inferred types\n - Validate existing @type tags against inferred types\n - Validate existing @param tags against arguments\n - Loose @return tag matches\n - Ignore all undefined types\n\nTyped checks compare type tags to inferred types" | ||
| }, | ||
| { | ||
| "const": "typecheck:strict", | ||
| "description": "Strict Typecheck Level:\n - @param tags are optional\n - Validate arity of calls to explicit methods\n - All methods must have either a @return tag or an inferred type\n - Resolve namespaces in all type tags\n - Validate existing @return tags against inferred types\n - Validate existing @param tags against arguments\n - Validate existing @type tags against inferred types\n - Strict @return tag matches\n - Validate method calls\n - Ignore undefined types from external sources\n\nStrict checks require all methods to have either a tagged type or an inferred type. If an untagged method’s type cannot be inferred, the type checker issues a warning. @param tags are optional, but checked if they exist" | ||
| }, | ||
| { | ||
| "const": "typecheck:strong", | ||
| "description": "Strong Typecheck Level:\n - @return and @param tags are required\n - Validate arity of calls to explicit methods\n - Resolve namespaces in all type tags\n - Validate @return tags against inferred types\n - Validate @param tags against arguments\n - Validate existing @type tags against inferred types\n - Strict @return tag matches\n - Validate method calls\n - Ignore undefined types from external sources\n\nStrong checks require all method types to be tagged and the inferred types to match the tags. @param tags are required" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "const": "update_errors", | ||
| "title": "Syntax Error Reporter", | ||
| "description": "Track repaired source code's error locations" | ||
| }, | ||
| { | ||
| "const": "all!", | ||
| "description": "Use all available reporters" | ||
| } | ||
| ] | ||
| }, | ||
| "description": "A list of reporters that Solargraph will use to analyze your code for problems" | ||
| }, | ||
| "max_files": { | ||
| "type": "integer", | ||
| "description": "Maximum number of files to index", | ||
| "default": 5000 | ||
| }, | ||
| "formatter": { | ||
| "type": "object", | ||
| "properties": { | ||
| "rubocop": { | ||
| "type": "object", | ||
| "properties": { | ||
| "cops": {"type": "string"}, | ||
| "except": {"$ref": "#/definitions/strArr"}, | ||
| "only": {"$ref": "#/definitions/strArr"}, | ||
| "extra_args": {"$ref": "#/definitions/strArr"} | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "definitions": { | ||
| "strArr": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind opening a separate PR with an explanation if you feel this should be part of the repo?