Skip to content

Commit b5c9ab2

Browse files
committed
Merge branch 'main' into stuartpa/normalize-eol
2 parents 5a0c911 + dcd3c2e commit b5c9ab2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+3315
-3313
lines changed

.github/workflows/codeql.yml

Lines changed: 79 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,79 @@
1-
# For most projects, this workflow file will not need changing; you simply need
2-
# to commit it to your repository.
3-
#
4-
# You may wish to alter this file to override the set of languages analyzed,
5-
# or to provide custom queries or build logic.
6-
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
#
12-
name: "CodeQL"
13-
14-
on:
15-
push:
16-
branches: [ "main" ]
17-
pull_request:
18-
# The branches below must be a subset of the branches above
19-
branches: [ "main" ]
20-
paths-ignore:
21-
- '**/*.md'
22-
- '**/*.txt'
23-
- '**/*.sql'
24-
25-
jobs:
26-
analyze:
27-
name: Analyze
28-
runs-on: ubuntu-latest
29-
permissions:
30-
actions: read
31-
contents: read
32-
security-events: write
33-
34-
strategy:
35-
fail-fast: false
36-
matrix:
37-
language: [ 'go' ]
38-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
39-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
40-
41-
steps:
42-
- name: Checkout repository
43-
uses: actions/checkout@v3
44-
45-
- name: Setup go
46-
uses: actions/setup-go@v2
47-
with:
48-
go-version: '1.18'
49-
50-
# Initializes the CodeQL tools for scanning.
51-
- name: Initialize CodeQL
52-
uses: github/codeql-action/init@v2
53-
with:
54-
languages: ${{ matrix.language }}
55-
# If you wish to specify custom queries, you can do so here or in a config file.
56-
# By default, queries listed here will override any specified in a config file.
57-
# Prefix the list here with "+" to use these queries and those in the config file.
58-
59-
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
60-
# queries: security-extended,security-and-quality
61-
62-
63-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
64-
# If this step fails, then you should remove it and run the build manually (see below)
65-
- name: Autobuild
66-
uses: github/codeql-action/autobuild@v2
67-
68-
# ℹ️ Command-line programs to run using the OS shell.
69-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
70-
71-
# If the Autobuild fails above, remove it and uncomment the following three lines.
72-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
73-
74-
# - run: |
75-
# echo "Run, Build Application using script"
76-
# ./location_of_script_within_repo/buildscript.sh
77-
78-
- name: Perform CodeQL Analysis
79-
uses: github/codeql-action/analyze@v2
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ "main" ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ "main" ]
20+
paths-ignore:
21+
- '**/*.md'
22+
- '**/*.txt'
23+
- '**/*.sql'
24+
25+
jobs:
26+
analyze:
27+
name: Analyze
28+
runs-on: ubuntu-latest
29+
permissions:
30+
actions: read
31+
contents: read
32+
security-events: write
33+
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
language: [ 'go' ]
38+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
39+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
40+
41+
steps:
42+
- name: Checkout repository
43+
uses: actions/checkout@v3
44+
45+
- name: Setup go
46+
uses: actions/setup-go@v2
47+
with:
48+
go-version: '1.18'
49+
50+
# Initializes the CodeQL tools for scanning.
51+
- name: Initialize CodeQL
52+
uses: github/codeql-action/init@v2
53+
with:
54+
languages: ${{ matrix.language }}
55+
# If you wish to specify custom queries, you can do so here or in a config file.
56+
# By default, queries listed here will override any specified in a config file.
57+
# Prefix the list here with "+" to use these queries and those in the config file.
58+
59+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
60+
# queries: security-extended,security-and-quality
61+
62+
63+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
64+
# If this step fails, then you should remove it and run the build manually (see below)
65+
- name: Autobuild
66+
uses: github/codeql-action/autobuild@v2
67+
68+
# ℹ️ Command-line programs to run using the OS shell.
69+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
70+
71+
# If the Autobuild fails above, remove it and uncomment the following three lines.
72+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
73+
74+
# - run: |
75+
# echo "Run, Build Application using script"
76+
# ./location_of_script_within_repo/buildscript.sh
77+
78+
- name: Perform CodeQL Analysis
79+
uses: github/codeql-action/analyze@v2
Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
name: pr-validation
2-
3-
on:
4-
pull_request:
5-
branches:
6-
- main
7-
8-
jobs:
9-
build:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v2
13-
- name: Setup go
14-
uses: actions/setup-go@v2
15-
with:
16-
go-version: '1.18'
17-
- name: Run tests against Linux SQL
18-
run: |
19-
go version
20-
cd cmd/sqlcmd
21-
go get -d
22-
go build .
23-
export SQLCMDPASSWORD=$(date +%s|sha256sum|base64|head -c 32)
24-
export SQLCMDUSER=sa
25-
docker run -m 2GB -e ACCEPT_EULA=1 -d --name sql2017 -p:1433:1433 -e SA_PASSWORD=$SQLCMDPASSWORD mcr.microsoft.com/mssql/server:2017-latest
26-
cd ../..
27-
go test -v ./...
1+
name: pr-validation
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Setup go
14+
uses: actions/setup-go@v2
15+
with:
16+
go-version: '1.18'
17+
- name: Run tests against Linux SQL
18+
run: |
19+
go version
20+
cd cmd/sqlcmd
21+
go get -d
22+
go build .
23+
export SQLCMDPASSWORD=$(date +%s|sha256sum|base64|head -c 32)
24+
export SQLCMDUSER=sa
25+
docker run -m 2GB -e ACCEPT_EULA=1 -d --name sql2017 -p:1433:1433 -e SA_PASSWORD=$SQLCMDPASSWORD mcr.microsoft.com/mssql/server:2017-latest
26+
cd ../..
27+
go test -v ./...

.gitignore

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
# Binaries for programs and plugins
2-
output
3-
*.exe
4-
*.exe~
5-
*.dll
6-
*.so
7-
*.dylib
8-
9-
# Test binary, built with `go test -c`
10-
*.test
11-
12-
# Output of the go coverage tool, specifically when used with LiteIDE
13-
*.out
14-
15-
# Dependency directories (remove the comment below to include it)
16-
# vendor/
17-
18-
coverage.json
19-
coverage.txt
20-
coverage.xml
21-
testresults.xml
22-
23-
# .syso is generated by go-winres. Only needed for official builds
24-
*.syso
1+
# Binaries for programs and plugins
2+
output
3+
*.exe
4+
*.exe~
5+
*.dll
6+
*.so
7+
*.dylib
8+
9+
# Test binary, built with `go test -c`
10+
*.test
11+
12+
# Output of the go coverage tool, specifically when used with LiteIDE
13+
*.out
14+
15+
# Dependency directories (remove the comment below to include it)
16+
# vendor/
17+
18+
coverage.json
19+
coverage.txt
20+
coverage.xml
21+
testresults.xml
22+
23+
# .syso is generated by go-winres. Only needed for official builds
24+
*.syso

.vscode/launch.json

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5-
"version": "0.2.0",
6-
"configurations": [
7-
8-
9-
{
10-
11-
"name": "Attach to Process",
12-
13-
"type": "go",
14-
15-
"request": "attach",
16-
17-
"mode": "local",
18-
19-
"processId": 0
20-
21-
},
22-
{
23-
"name" : "Run query and exit",
24-
"type" : "go",
25-
"request": "launch",
26-
"mode" : "auto",
27-
"program": "${workspaceFolder}/cmd/sqlcmd",
28-
"args" : ["-Q", "EXIT(select 100 as Count)"],
29-
},
30-
{
31-
"name" : "Run file query",
32-
"type" : "go",
33-
"request": "launch",
34-
"mode" : "auto",
35-
"program": "${workspaceFolder}/cmd/sqlcmd",
36-
"args" : ["-i", "testdata\\select100.sql"],
37-
},
38-
]
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
8+
9+
{
10+
11+
"name": "Attach to Process",
12+
13+
"type": "go",
14+
15+
"request": "attach",
16+
17+
"mode": "local",
18+
19+
"processId": 0
20+
21+
},
22+
{
23+
"name" : "Run query and exit",
24+
"type" : "go",
25+
"request": "launch",
26+
"mode" : "auto",
27+
"program": "${workspaceFolder}/cmd/sqlcmd",
28+
"args" : ["-Q", "EXIT(select 100 as Count)"],
29+
},
30+
{
31+
"name" : "Run file query",
32+
"type" : "go",
33+
"request": "launch",
34+
"mode" : "auto",
35+
"program": "${workspaceFolder}/cmd/sqlcmd",
36+
"args" : ["-i", "testdata\\select100.sql"],
37+
},
38+
]
3939
}

.vscode/tasks.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
{
2-
// See https://go.microsoft.com/fwlink/?LinkId=733558
3-
// for the documentation about the tasks.json format
4-
"version": "2.0.0",
5-
"tasks": [
6-
]
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
]
77
}

CODE_OF_CONDUCT.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Microsoft Open Source Code of Conduct
2-
3-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4-
5-
Resources:
6-
7-
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8-
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9-
- Contact [[email protected]](mailto:[email protected]) with questions or concerns
1+
# Microsoft Open Source Code of Conduct
2+
3+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4+
5+
Resources:
6+
7+
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8+
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9+
- Contact [[email protected]](mailto:[email protected]) with questions or concerns

0 commit comments

Comments
 (0)