mirror of
https://github.com/silverqx/TinyORM.git
synced 2026-04-25 02:08:22 -05:00
set strict mode for ExportInHeader.ps1
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
Set-StrictMode -Version 3.0
|
||||
|
||||
$hppFiles = Get-ChildItem -Path ..\include\*.hpp -Recurse
|
||||
$cppFiles = Get-ChildItem -Path ..\src\*.cpp -Recurse
|
||||
|
||||
@@ -6,7 +8,7 @@ foreach ($hppFile in $hppFiles)
|
||||
$cppFile = $hppFile -replace '\\include\\', '\src\'
|
||||
$cppFile = $cppFile -replace '\.hpp', '.cpp'
|
||||
|
||||
$hasCpp = $cppFiles | Where-Object FullName -CEQ $cppFile
|
||||
$hasCpp = @($cppFiles | Where-Object FullName -CEQ $cppFile)
|
||||
if ($hasCpp.Count -gt 1)
|
||||
{
|
||||
throw 'More results for ' + $cppFile
|
||||
@@ -16,7 +18,7 @@ foreach ($hppFile in $hppFiles)
|
||||
continue
|
||||
}
|
||||
|
||||
$containsExport = Select-String -Path $hppFile -Pattern 'SHAREDLIB_EXPORT'
|
||||
$containsExport = @(Select-String -Path $hppFile -Pattern 'SHAREDLIB_EXPORT')
|
||||
if ($containsExport.Count -eq 0)
|
||||
{
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user