Skip to content

Commit d036c0f

Browse files
Fix PSScriptAnalyzer linter warnings: align assignment operators in ConvertFrom-Lua hashtable; resolve indentation inconsistency in Read-LuaTable by inlining throw message
1 parent 10c60f9 commit d036c0f

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

src/functions/private/Read-LuaTable.ps1

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,7 @@
9191
if ($script:luaSkipValidation) {
9292
Write-Warning "Reserved word '$ident' used as a bare identifier key at position $identStart."
9393
} else {
94-
$msg = "Reserved word '$ident' cannot be used as a bare identifier key" +
95-
" in a Lua table. Use bracket notation: [`"$ident`"] = value."
96-
throw $msg
94+
throw "Reserved word '$ident' cannot be used as a bare identifier key. Use bracket notation: [`"$ident`"] = value."
9795
}
9896
}
9997
# Key = value pair

src/functions/public/Lua/ConvertFrom-Lua.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@
8888

8989
process {
9090
$convertParams = @{
91-
InputString = $InputObject
91+
InputString = $InputObject
9292
AsPSCustomObject = -not $AsHashtable
93-
MaxDepth = $Depth
94-
SkipValidation = $SkipValidation.IsPresent
93+
MaxDepth = $Depth
94+
SkipValidation = $SkipValidation.IsPresent
9595
}
9696
$result = ConvertFrom-LuaTable @convertParams
9797
if ($NoEnumerate -and $result -is [System.Array]) {

0 commit comments

Comments
 (0)