-
Notifications
You must be signed in to change notification settings - Fork 115
Implement union type validation for static language support #5603
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
Merged
Changes from 5 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
372a180
merge conflict
margaretjgu d003b69
modify rule to skip null undefined
margaretjgu 90afbf8
modify rule to skip null undefined
margaretjgu dda5822
all ignore comments for existing violations
margaretjgu f8784ec
update variant rule
margaretjgu 6424ec7
remove empty line
margaretjgu 274ca87
remove empty line
margaretjgu 10d6d66
Merge branch 'main' into unions
margaretjgu 6e8c9af
Switch from Array<string> to string[] in inference
pquentin 0baddb1
fix
margaretjgu 1819245
Merge remote-tracking branch 'origin/main' into unions
pquentin 16b1a82
Remove empty lines
pquentin 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 |
|---|---|---|
|
|
@@ -84,11 +84,13 @@ export class IndexSettings | |
| * @server_default 1 | ||
| * @availability stack | ||
| * */ | ||
| // eslint-disable-next-line es-spec-validator/no-inline-unions -- TODO: create named alias | ||
| number_of_shards?: integer | string // TODO: should be only int | ||
|
Comment on lines
+87
to
88
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the record, this a known issue with index settings that they can be passed as strings too.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should actually be Stringyfied I think. |
||
| /** | ||
| * @server_default 0 | ||
| * @availability stack | ||
| * */ | ||
| // eslint-disable-next-line es-spec-validator/no-inline-unions -- TODO: create named alias | ||
| number_of_replicas?: integer | string // TODO: should be only int | ||
| number_of_routing_shards?: integer | ||
| /** @server_default false */ | ||
|
|
@@ -100,6 +102,7 @@ export class IndexSettings | |
| /** @server_default true */ | ||
| load_fixed_bitset_filters_eagerly?: boolean | ||
| /** @server_default false */ | ||
| // eslint-disable-next-line es-spec-validator/no-inline-unions -- TODO: create named alias | ||
| hidden?: boolean | string // TODO should be bool only | ||
| /** @server_default false */ | ||
| auto_expand_replicas?: WithNullValue<string> | ||
|
|
@@ -147,11 +150,14 @@ export class IndexSettings | |
| creation_date_string?: DateTime | ||
| uuid?: Uuid | ||
| version?: IndexVersioning | ||
| // eslint-disable-next-line es-spec-validator/no-inline-unions -- TODO: create named alias | ||
| verified_before_close?: boolean | string | ||
| // eslint-disable-next-line es-spec-validator/no-inline-unions -- TODO: create named alias | ||
| format?: string | integer | ||
| max_slices_per_scroll?: integer | ||
| translog?: Translog | ||
| query_string?: SettingsQueryString | ||
| // eslint-disable-next-line es-spec-validator/no-inline-unions -- TODO: create named alias | ||
| priority?: integer | string | ||
| top_metrics_max_size?: integer | ||
| analysis?: IndexSettingsAnalysis | ||
|
|
@@ -332,6 +338,7 @@ export class IndexSettingsLifecycle { | |
| * applicable for an index). | ||
| * @server_default true | ||
| */ | ||
| // eslint-disable-next-line es-spec-validator/no-inline-unions -- TODO: create named alias | ||
| prefer_ilm?: boolean | string | ||
| } | ||
|
|
||
|
|
@@ -448,6 +455,7 @@ export class MappingLimitSettings { | |
| field_name_length?: MappingLimitSettingsFieldNameLength | ||
| dimension_fields?: MappingLimitSettingsDimensionFields | ||
| source?: MappingLimitSettingsSourceFields | ||
| // eslint-disable-next-line es-spec-validator/no-inline-unions -- TODO: create named alias | ||
| ignore_malformed?: boolean | string | ||
| } | ||
|
|
||
|
|
@@ -458,6 +466,7 @@ export class MappingLimitSettingsTotalFields { | |
| * degradations and memory issues, especially in clusters with a high load or few resources. | ||
| * @server_default 1000 | ||
| */ | ||
| // eslint-disable-next-line es-spec-validator/no-inline-unions -- TODO: create named alias | ||
| limit?: long | string | ||
| /** | ||
| * This setting determines what happens when a dynamically mapped field would exceed the total fields limit. When set | ||
|
|
@@ -467,6 +476,7 @@ export class MappingLimitSettingsTotalFields { | |
| * The fields that were not added to the mapping will be added to the _ignored field. | ||
| * @server_default false | ||
| */ | ||
| // eslint-disable-next-line es-spec-validator/no-inline-unions -- TODO: create named alias | ||
| ignore_dynamic_beyond_limit?: boolean | string | ||
| } | ||
|
|
||
|
|
||
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.