Skip to content

Commit

Permalink
Fixed regression in module completions (#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
majastrz authored Nov 3, 2020
1 parent 3fdaca6 commit b845482
Show file tree
Hide file tree
Showing 14 changed files with 505 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
[
{
"label": "arrayOutput",
"kind": "property",
"detail": "arrayOutput",
"documentation": {
"kind": "markdown",
"value": "Type: `array` \nRead-only property \n"
},
"deprecated": false,
"preselect": false,
"sortText": "2_arrayOutput",
"insertTextFormat": "plainText",
"textEdit": {
"range": {},
"newText": "arrayOutput"
},
"commitCharacters": [
":"
]
},
{
"label": "objOutput",
"kind": "property",
"detail": "objOutput",
"documentation": {
"kind": "markdown",
"value": "Type: `object` \nRead-only property \n"
},
"deprecated": false,
"preselect": false,
"sortText": "2_objOutput",
"insertTextFormat": "plainText",
"textEdit": {
"range": {},
"newText": "objOutput"
},
"commitCharacters": [
":"
]
},
{
"label": "stringOutputA",
"kind": "property",
"detail": "stringOutputA",
"documentation": {
"kind": "markdown",
"value": "Type: `string` \nRead-only property \n"
},
"deprecated": false,
"preselect": false,
"sortText": "2_stringOutputA",
"insertTextFormat": "plainText",
"textEdit": {
"range": {},
"newText": "stringOutputA"
},
"commitCharacters": [
":"
]
},
{
"label": "stringOutputB",
"kind": "property",
"detail": "stringOutputB",
"documentation": {
"kind": "markdown",
"value": "Type: `string` \nRead-only property \n"
},
"deprecated": false,
"preselect": false,
"sortText": "2_stringOutputB",
"insertTextFormat": "plainText",
"textEdit": {
"range": {},
"newText": "stringOutputB"
},
"commitCharacters": [
":"
]
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
[
{
"label": "arrayParam",
"kind": "property",
"detail": "arrayParam (Required)",
"documentation": {
"kind": "markdown",
"value": "Type: `array` \nWrite-only property \n"
},
"deprecated": false,
"preselect": false,
"sortText": "2_arrayParam",
"insertTextFormat": "plainText",
"textEdit": {
"range": {},
"newText": "arrayParam"
},
"commitCharacters": [
":"
]
},
{
"label": "objParam",
"kind": "property",
"detail": "objParam (Required)",
"documentation": {
"kind": "markdown",
"value": "Type: `object` \nWrite-only property \n"
},
"deprecated": false,
"preselect": false,
"sortText": "2_objParam",
"insertTextFormat": "plainText",
"textEdit": {
"range": {},
"newText": "objParam"
},
"commitCharacters": [
":"
]
},
{
"label": "stringParamA",
"kind": "property",
"detail": "stringParamA",
"documentation": {
"kind": "markdown",
"value": "Type: `string` \nWrite-only property \n"
},
"deprecated": false,
"preselect": false,
"sortText": "2_stringParamA",
"insertTextFormat": "plainText",
"textEdit": {
"range": {},
"newText": "stringParamA"
},
"commitCharacters": [
":"
]
},
{
"label": "stringParamB",
"kind": "property",
"detail": "stringParamB (Required)",
"documentation": {
"kind": "markdown",
"value": "Type: `string` \nWrite-only property \n"
},
"deprecated": false,
"preselect": false,
"sortText": "2_stringParamB",
"insertTextFormat": "plainText",
"textEdit": {
"range": {},
"newText": "stringParamB"
},
"commitCharacters": [
":"
]
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
[
{
"label": "dependsOn",
"kind": "property",
"detail": "dependsOn",
"documentation": {
"kind": "markdown",
"value": "Type: `resource | module[]` \nWrite-only property \n"
},
"deprecated": false,
"preselect": false,
"sortText": "2_dependsOn",
"insertTextFormat": "plainText",
"textEdit": {
"range": {},
"newText": "dependsOn"
},
"commitCharacters": [
":"
]
},
{
"label": "name",
"kind": "property",
"detail": "name (Required)",
"documentation": {
"kind": "markdown",
"value": "Type: `string` \n"
},
"deprecated": false,
"preselect": false,
"sortText": "2_name",
"insertTextFormat": "plainText",
"textEdit": {
"range": {},
"newText": "name"
},
"commitCharacters": [
":"
]
},
{
"label": "params",
"kind": "property",
"detail": "params (Required)",
"documentation": {
"kind": "markdown",
"value": "Type: `params` \nWrite-only property \n"
},
"deprecated": false,
"preselect": false,
"sortText": "2_params",
"insertTextFormat": "plainText",
"textEdit": {
"range": {},
"newText": "params"
},
"commitCharacters": [
":"
]
},
{
"label": "scope",
"kind": "property",
"detail": "scope",
"documentation": {
"kind": "markdown",
"value": "Type: `resourceGroup` \nWrite-only property \n"
},
"deprecated": false,
"preselect": false,
"sortText": "2_scope",
"insertTextFormat": "plainText",
"textEdit": {
"range": {},
"newText": "scope"
},
"commitCharacters": [
":"
]
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[
{
"label": "dependsOn",
"kind": "property",
"detail": "dependsOn",
"documentation": {
"kind": "markdown",
"value": "Type: `resource | module[]` \nWrite-only property \n"
},
"deprecated": false,
"preselect": false,
"sortText": "2_dependsOn",
"insertTextFormat": "plainText",
"textEdit": {
"range": {},
"newText": "dependsOn"
},
"commitCharacters": [
":"
]
},
{
"label": "params",
"kind": "property",
"detail": "params (Required)",
"documentation": {
"kind": "markdown",
"value": "Type: `params` \nWrite-only property \n"
},
"deprecated": false,
"preselect": false,
"sortText": "2_params",
"insertTextFormat": "plainText",
"textEdit": {
"range": {},
"newText": "params"
},
"commitCharacters": [
":"
]
},
{
"label": "scope",
"kind": "property",
"detail": "scope",
"documentation": {
"kind": "markdown",
"value": "Type: `resourceGroup` \nWrite-only property \n"
},
"deprecated": false,
"preselect": false,
"sortText": "2_scope",
"insertTextFormat": "plainText",
"textEdit": {
"range": {},
"newText": "scope"
},
"commitCharacters": [
":"
]
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[
{
"label": "name",
"kind": "property",
"detail": "name (Required)",
"documentation": {
"kind": "markdown",
"value": "Type: `string` \n"
},
"deprecated": false,
"preselect": false,
"sortText": "2_name",
"insertTextFormat": "plainText",
"textEdit": {
"range": {},
"newText": "name"
},
"commitCharacters": [
":"
]
},
{
"label": "outputs",
"kind": "property",
"detail": "outputs",
"documentation": {
"kind": "markdown",
"value": "Type: `outputs` \nRead-only property \n"
},
"deprecated": false,
"preselect": false,
"sortText": "2_outputs",
"insertTextFormat": "plainText",
"textEdit": {
"range": {},
"newText": "outputs"
},
"commitCharacters": [
":"
]
}
]
12 changes: 11 additions & 1 deletion src/Bicep.Core.Samples/Files/InvalidModules_LF/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,30 @@ module './main.bicep' = {
}

module modANoName './modulea.bicep' = {
// #completionTest(0) -> moduleATopLevelProperties

}

module modANoInputs './modulea.bicep' = {
name: 'modANoInputs'
// #completionTest(0,1,2) -> moduleATopLevelPropertiesMinusName

}

module modAEmptyInputs './modulea.bicep' = {
name: 'modANoInputs'
params: {

// #completionTest(0,1,2,3,4) -> moduleAParams

}
}

// #completionTest(55) -> moduleATopLevelPropertyAccess
var modulePropertyAccessCompletions = modAEmptyInputs.o

// #completionTest(56) -> moduleAOutputs
var moduleOutputsCompletions = modAEmptyInputs.outputs.s

module modAUnspecifiedInputs './modulea.bicep' = {
name: 'modAUnspecifiedInputs'
params: {
Expand Down
Loading

0 comments on commit b845482

Please sign in to comment.