Skip to content

Commit a6b4d40

Browse files
authored
Merge pull request #153 from LowlyDBA/development
Development
2 parents 1ff4bde + 0621732 commit a6b4d40

24 files changed

+3238
-426
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# linguist overrides
22
*.sql linguist-language=TSQL
3+
*.sql diff
34

45
# line endings for code coverage files
56
appveyor/sqlcover/* text eol=lf

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.markdownlint.json
22
node_modules/*
33
package-lock.json
4+
debug.log

appveyor/build_tsqlt_tests.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ param(
99
$Color = "Green"
1010
)
1111

12+
$ErrorActionPreference = "Stop"
13+
1214
Write-Host "Building tSQLt Tests..." -ForegroundColor $Color
1315

1416
If ($IsAzureSQL) {

appveyor/generate_combined_script.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ if (Test-Path $File) {
55
Remove-Item $File
66
}
77

8-
Get-Item $Filter | Get-Content | Out-File $File
8+
Get-Item $Filter | Get-Content | Out-File $File -Encoding utf8

appveyor/install_dependencies.ps1

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@ Write-Host "Installing dependencies..." -ForegroundColor $Color
77

88
# TSQLLinter
99
# Try/Catch to stop appveyor unnecessary errors
10-
Try { npm install tsqllint -g | Out-Null }
11-
Catch { }
10+
$result = npm list -g --depth=0
11+
If (-Not ($result -Match "tsqllint")) {
12+
npm install tsqllint -g | Out-Null
13+
}
1214

1315
# SQLServer Module
1416
if (!(Get-Module -ListAvailable -Name SqlServer)) {
1517
Install-Module SqlServer -Force -AllowClobber
1618
}
1719

1820
# DbaTools Module
19-
Install-Module DbaTools -Force -AllowClobber
21+
if (!(Get-Module -ListAvailable -Name DbaTools)) {
22+
Install-Module DbaTools -Force -AllowClobber
23+
}

appveyor/run_tsqllint.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@ param(
44
$Color = "Green"
55
)
66

7+
$ErrorActionPreference = "Stop"
8+
79
Write-Host "Running TSQLLint with config $Config..." -ForegroundColor $Color
810
tsqllint -c $Config *.sql

appveyor/sqlcover/Coverage.opencoverxml

Lines changed: 579 additions & 366 deletions
Large diffs are not rendered by default.

appveyor/sqlcover/Run_SQLCover.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ If ($IsCoverStarted) {
5252
$tmpFile = Join-Path $env:TEMP "Coverage.html"
5353
Set-Content -Path $tmpFile -Value $coverageResults.Html2() -Force
5454
Invoke-Item $tmpFile
55-
Start-Sleep -Seconds 1
55+
Start-Sleep -Seconds 3
5656
Remove-Item $tmpFile
5757
}
5858
}

appveyor/sqlcover/[dbo].[sp_doc]

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CREATE PROCEDURE [dbo].[sp_doc]
44
,@ExtendedPropertyName SYSNAME = 'Description'
55
,@LimitStoredProcLength BIT = 1
66
,@Emojis BIT = 0
7+
,@Verbose BIT = 1
78
/* Parameters defined here for testing only */
89
,@SqlMajorVersion TINYINT = 0
910
,@SqlMinorVersion SMALLINT = 0
@@ -78,6 +79,11 @@ BEGIN
7879
IF (@DatabaseName IS NULL)
7980
BEGIN
8081
SET @DatabaseName = DB_NAME();
82+
IF (@Verbose = 1)
83+
BEGIN;
84+
SET @Msg = 'No database provided, assuming current database.';
85+
RAISERROR(@Msg, 10, 1) WITH NOWAIT;
86+
END;
8187
END
8288
ELSE IF (DB_ID(@DatabaseName) IS NULL)
8389
BEGIN;

0 commit comments

Comments
 (0)