-
Notifications
You must be signed in to change notification settings - Fork 74
Add .gitattributes and Renormalize #161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+4,026
−4,021
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5a0c911
Normalize eol
stuartpa f251bca
Saving changes
stuartpa dcd3c2e
Merge conflicts
stuartpa b5c9ab2
Merge branch 'main' into stuartpa/normalize-eol
stuartpa bbc1dea
Make filename cross plat, and normalize EOLs
stuartpa 45c41c9
Merge fix-tests-for-windows branch
stuartpa fa66fe4
Merge conflicts
stuartpa 4276145
Merge conflicts
stuartpa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* text=auto | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
name: golangci-lint | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
jobs: | ||
golangci-pr: | ||
name: lint-pr-changes | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
- uses: actions/checkout@v3 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest | ||
only-new-issues: true | ||
name: golangci-lint | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
jobs: | ||
golangci-pr: | ||
name: lint-pr-changes | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
- uses: actions/checkout@v3 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest | ||
only-new-issues: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,53 @@ | ||
variables: | ||
# AZURE_CLIENT_SECRET and SQLPASSWORD must be defined as secret variables in the pipeline. | ||
# AZURE_TENANT_ID and AZURE_CLIENT_ID are not expected to be secret variables, just regular variables | ||
AZURECLIENTSECRET: $(AZURE_CLIENT_SECRET) | ||
PASSWORD: $(SQLPASSWORD) | ||
pool: | ||
vmImage: 'ubuntu-latest' | ||
steps: | ||
- template: include-install-go-tools.yml | ||
- task: Docker@2 | ||
displayName: 'Run SQL 2017 docker image' | ||
inputs: | ||
command: run | ||
arguments: '-m 2GB -e ACCEPT_EULA=1 -d --name sql2017 -p:1433:1433 -e SA_PASSWORD=$(PASSWORD) mcr.microsoft.com/mssql/server:2017-latest' | ||
- template: include-runtests-linux.yml | ||
parameters: | ||
RunName: 'SQL2017' | ||
SQLCMDUSER: sa | ||
SQLPASSWORD: $(PASSWORD) | ||
- template: include-runtests-linux.yml | ||
parameters: | ||
RunName: 'SQLDB' | ||
# AZURESERVER must be defined as a variable in the pipeline | ||
SQLCMDSERVER: $(AZURESERVER) | ||
AZURECLIENTSECRET: $(AZURECLIENTSECRET) | ||
- task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4 | ||
displayName: Merge coverage data | ||
inputs: | ||
reports: '**/*.coverage.xml"' # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported. | ||
targetdir: 'coverage' # REQUIRED # The directory where the generated report should be saved. | ||
reporttypes: 'HtmlInline_AzurePipelines;Cobertura' # The output formats and scope (separated by semicolon) Values: Badges, Clover, Cobertura, CsvSummary, Html, HtmlChart, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlSummary, JsonSummary, Latex, LatexSummary, lcov, MarkdownSummary, MHtml, PngChart, SonarQube, TeamCitySummary, TextSummary, Xml, XmlSummary | ||
sourcedirs: '$(Build.SourcesDirectory)' # Optional directories which contain the corresponding source code (separated by semicolon). The source directories are used if coverage report contains classes without path information. | ||
verbosity: 'Info' # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off | ||
tag: '$(build.buildnumber)_#$(build.buildid)_$(Build.SourceBranchName)' # Optional tag or build version. | ||
- task: PublishCodeCoverageResults@1 | ||
inputs: | ||
codeCoverageTool: Cobertura | ||
pathToSources: '$(Build.SourcesDirectory)' | ||
summaryFileLocation: $(Build.SourcesDirectory)/coverage/*.xml | ||
reportDirectory: $(Build.SourcesDirectory)/coverage | ||
failIfCoverageEmpty: true | ||
condition: always() | ||
continueOnError: true | ||
env: | ||
disable.coverage.autogenerate: 'true' | ||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 | ||
displayName: ‘Component Detection’ | ||
variables: | ||
# AZURE_CLIENT_SECRET and SQLPASSWORD must be defined as secret variables in the pipeline. | ||
# AZURE_TENANT_ID and AZURE_CLIENT_ID are not expected to be secret variables, just regular variables | ||
AZURECLIENTSECRET: $(AZURE_CLIENT_SECRET) | ||
PASSWORD: $(SQLPASSWORD) | ||
pool: | ||
vmImage: 'ubuntu-latest' | ||
|
||
steps: | ||
- template: include-install-go-tools.yml | ||
|
||
- task: Docker@2 | ||
displayName: 'Run SQL 2017 docker image' | ||
inputs: | ||
command: run | ||
arguments: '-m 2GB -e ACCEPT_EULA=1 -d --name sql2017 -p:1433:1433 -e SA_PASSWORD=$(PASSWORD) mcr.microsoft.com/mssql/server:2017-latest' | ||
|
||
- template: include-runtests-linux.yml | ||
parameters: | ||
RunName: 'SQL2017' | ||
SQLCMDUSER: sa | ||
SQLPASSWORD: $(PASSWORD) | ||
|
||
- template: include-runtests-linux.yml | ||
parameters: | ||
RunName: 'SQLDB' | ||
# AZURESERVER must be defined as a variable in the pipeline | ||
SQLCMDSERVER: $(AZURESERVER) | ||
AZURECLIENTSECRET: $(AZURECLIENTSECRET) | ||
|
||
- task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4 | ||
displayName: Merge coverage data | ||
inputs: | ||
reports: '**/*.coverage.xml"' # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported. | ||
targetdir: 'coverage' # REQUIRED # The directory where the generated report should be saved. | ||
reporttypes: 'HtmlInline_AzurePipelines;Cobertura' # The output formats and scope (separated by semicolon) Values: Badges, Clover, Cobertura, CsvSummary, Html, HtmlChart, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlSummary, JsonSummary, Latex, LatexSummary, lcov, MarkdownSummary, MHtml, PngChart, SonarQube, TeamCitySummary, TextSummary, Xml, XmlSummary | ||
sourcedirs: '$(Build.SourcesDirectory)' # Optional directories which contain the corresponding source code (separated by semicolon). The source directories are used if coverage report contains classes without path information. | ||
verbosity: 'Info' # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off | ||
tag: '$(build.buildnumber)_#$(build.buildid)_$(Build.SourceBranchName)' # Optional tag or build version. | ||
- task: PublishCodeCoverageResults@1 | ||
inputs: | ||
codeCoverageTool: Cobertura | ||
pathToSources: '$(Build.SourcesDirectory)' | ||
summaryFileLocation: $(Build.SourcesDirectory)/coverage/*.xml | ||
reportDirectory: $(Build.SourcesDirectory)/coverage | ||
failIfCoverageEmpty: true | ||
condition: always() | ||
continueOnError: true | ||
env: | ||
disable.coverage.autogenerate: 'true' | ||
|
||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 | ||
displayName: ‘Component Detection’ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
steps: | ||
- task: GoTool@0 | ||
inputs: | ||
version: '1.18' | ||
- task: Go@0 | ||
displayName: 'Go: get dependencies' | ||
inputs: | ||
command: 'get' | ||
arguments: '-d' | ||
workingDirectory: '$(Build.SourcesDirectory)/cmd/sqlcmd' | ||
- task: Go@0 | ||
displayName: 'Go: install gotest.tools/gotestsum' | ||
inputs: | ||
command: 'custom' | ||
customCommand: 'install' | ||
arguments: 'gotest.tools/gotestsum@latest' | ||
workingDirectory: '$(System.DefaultWorkingDirectory)' | ||
- task: Go@0 | ||
displayName: 'Go: install github.com/axw/gocov/gocov' | ||
inputs: | ||
command: 'custom' | ||
customCommand: 'install' | ||
arguments: 'github.com/axw/gocov/gocov@latest' | ||
workingDirectory: '$(System.DefaultWorkingDirectory)' | ||
- task: Go@0 | ||
displayName: 'Go: install github.com/axw/gocov/gocov' | ||
inputs: | ||
command: 'custom' | ||
customCommand: 'install' | ||
arguments: 'github.com/AlekSi/gocov-xml@latest' | ||
workingDirectory: '$(System.DefaultWorkingDirectory)' | ||
steps: | ||
- task: GoTool@0 | ||
inputs: | ||
version: '1.18' | ||
- task: Go@0 | ||
displayName: 'Go: get dependencies' | ||
inputs: | ||
command: 'get' | ||
arguments: '-d' | ||
workingDirectory: '$(Build.SourcesDirectory)/cmd/sqlcmd' | ||
|
||
|
||
- task: Go@0 | ||
displayName: 'Go: install gotest.tools/gotestsum' | ||
inputs: | ||
command: 'custom' | ||
customCommand: 'install' | ||
arguments: 'gotest.tools/gotestsum@latest' | ||
workingDirectory: '$(System.DefaultWorkingDirectory)' | ||
|
||
- task: Go@0 | ||
displayName: 'Go: install github.com/axw/gocov/gocov' | ||
inputs: | ||
command: 'custom' | ||
customCommand: 'install' | ||
arguments: 'github.com/axw/gocov/gocov@latest' | ||
workingDirectory: '$(System.DefaultWorkingDirectory)' | ||
|
||
- task: Go@0 | ||
displayName: 'Go: install github.com/axw/gocov/gocov' | ||
inputs: | ||
command: 'custom' | ||
customCommand: 'install' | ||
arguments: 'github.com/AlekSi/gocov-xml@latest' | ||
workingDirectory: '$(System.DefaultWorkingDirectory)' | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
parameters: | ||
- name: RunName | ||
type: string | ||
- name: SQLCMDUSER | ||
type: string | ||
default: '' | ||
- name: SQLPASSWORD | ||
type: string | ||
default: '' | ||
- name: AZURECLIENTSECRET | ||
type: string | ||
default: '' | ||
- name: SQLCMDSERVER | ||
type: string | ||
default: . | ||
- name: SQLCMDDBNAME | ||
type: string | ||
default: '' | ||
steps: | ||
- script: | | ||
~/go/bin/gotestsum --junitfile "${{ parameters.RunName }}.testresults.xml" -- ./... -coverprofile="${{ parameters.RunName }}.coverage.txt" -covermode count | ||
~/go/bin/gocov convert "${{ parameters.RunName }}.coverage.txt" > "${{ parameters.RunName }}.coverage.json" | ||
~/go/bin/gocov-xml < "${{ parameters.RunName }}.coverage.json" > ${{ parameters.RunName }}.coverage.xml | ||
mkdir -p coverage | ||
workingDirectory: '$(Build.SourcesDirectory)' | ||
displayName: 'run tests' | ||
env: | ||
SQLPASSWORD: ${{ parameters.SQLPASSWORD }} | ||
SQLCMDUSER: ${{ parameters.SQLCMDUSER }} | ||
SQLCMDPASSWORD: ${{ parameters.SQLPASSWORD }} | ||
AZURE_TENANT_ID: $(AZURE_TENANT_ID) | ||
AZURE_CLIENT_ID: $(AZURE_CLIENT_ID) | ||
AZURE_CLIENT_SECRET: ${{ parameters.AZURECLIENTSECRET }} | ||
SQLCMDSERVER: ${{ parameters.SQLCMDSERVER }} | ||
SQLCMDDBNAME: ${{ parameters.SQLCMDDBNAME }} | ||
continueOnError: true | ||
- task: PublishTestResults@2 | ||
displayName: "Publish junit-style results" | ||
inputs: | ||
testResultsFiles: '${{ parameters.RunName }}.testresults.xml' | ||
testResultsFormat: JUnit | ||
searchFolder: '$(Build.SourcesDirectory)' | ||
testRunTitle: '${{ parameters.RunName }} - $(Build.SourceBranchName)' | ||
failTaskOnFailedTests: true | ||
condition: always() | ||
parameters: | ||
- name: RunName | ||
type: string | ||
- name: SQLCMDUSER | ||
type: string | ||
default: '' | ||
- name: SQLPASSWORD | ||
type: string | ||
default: '' | ||
- name: AZURECLIENTSECRET | ||
type: string | ||
default: '' | ||
- name: SQLCMDSERVER | ||
type: string | ||
default: . | ||
- name: SQLCMDDBNAME | ||
type: string | ||
default: '' | ||
steps: | ||
- script: | | ||
~/go/bin/gotestsum --junitfile "${{ parameters.RunName }}.testresults.xml" -- ./... -coverprofile="${{ parameters.RunName }}.coverage.txt" -covermode count | ||
~/go/bin/gocov convert "${{ parameters.RunName }}.coverage.txt" > "${{ parameters.RunName }}.coverage.json" | ||
~/go/bin/gocov-xml < "${{ parameters.RunName }}.coverage.json" > ${{ parameters.RunName }}.coverage.xml | ||
mkdir -p coverage | ||
workingDirectory: '$(Build.SourcesDirectory)' | ||
displayName: 'run tests' | ||
env: | ||
SQLPASSWORD: ${{ parameters.SQLPASSWORD }} | ||
SQLCMDUSER: ${{ parameters.SQLCMDUSER }} | ||
SQLCMDPASSWORD: ${{ parameters.SQLPASSWORD }} | ||
AZURE_TENANT_ID: $(AZURE_TENANT_ID) | ||
AZURE_CLIENT_ID: $(AZURE_CLIENT_ID) | ||
AZURE_CLIENT_SECRET: ${{ parameters.AZURECLIENTSECRET }} | ||
SQLCMDSERVER: ${{ parameters.SQLCMDSERVER }} | ||
SQLCMDDBNAME: ${{ parameters.SQLCMDDBNAME }} | ||
continueOnError: true | ||
|
||
- task: PublishTestResults@2 | ||
displayName: "Publish junit-style results" | ||
inputs: | ||
testResultsFiles: '${{ parameters.RunName }}.testresults.xml' | ||
testResultsFormat: JUnit | ||
searchFolder: '$(Build.SourcesDirectory)' | ||
testRunTitle: '${{ parameters.RunName }} - $(Build.SourceBranchName)' | ||
failTaskOnFailedTests: true | ||
condition: always() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
# TODO: The maintainer of this repo has not yet edited this file | ||
**REPO OWNER**: Do you want Customer Service & Support (CSS) support for this product/project? | ||
- **No CSS support:** Fill out this template with information about how to file issues and get help. | ||
- **Yes CSS support:** Fill out an intake form at [aka.ms/spot](https://aka.ms/spot). CSS will work with/help you to determine next steps. More details also available at [aka.ms/onboardsupport](https://aka.ms/onboardsupport). | ||
- **Not sure?** Fill out a SPOT intake as though the answer were "Yes". CSS will help you decide. | ||
*Then remove this first heading from this SUPPORT.MD file before publishing your repo.* | ||
# Support | ||
## How to file issues and get help | ||
This project uses GitHub Issues to track bugs and feature requests. Please search the existing | ||
issues before filing new issues to avoid duplicates. For new issues, file your bug or | ||
feature request as a new Issue. | ||
For help and questions about using this project, please **REPO MAINTAINER: INSERT INSTRUCTIONS HERE | ||
FOR HOW TO ENGAGE REPO OWNERS OR COMMUNITY FOR HELP. COULD BE A STACK OVERFLOW TAG OR OTHER | ||
CHANNEL. WHERE WILL YOU HELP PEOPLE?**. | ||
## Microsoft Support Policy | ||
Support for this **PROJECT or PRODUCT** is limited to the resources listed above. | ||
# TODO: The maintainer of this repo has not yet edited this file | ||
|
||
**REPO OWNER**: Do you want Customer Service & Support (CSS) support for this product/project? | ||
|
||
- **No CSS support:** Fill out this template with information about how to file issues and get help. | ||
- **Yes CSS support:** Fill out an intake form at [aka.ms/spot](https://aka.ms/spot). CSS will work with/help you to determine next steps. More details also available at [aka.ms/onboardsupport](https://aka.ms/onboardsupport). | ||
- **Not sure?** Fill out a SPOT intake as though the answer were "Yes". CSS will help you decide. | ||
|
||
*Then remove this first heading from this SUPPORT.MD file before publishing your repo.* | ||
|
||
# Support | ||
|
||
## How to file issues and get help | ||
|
||
This project uses GitHub Issues to track bugs and feature requests. Please search the existing | ||
issues before filing new issues to avoid duplicates. For new issues, file your bug or | ||
feature request as a new Issue. | ||
|
||
For help and questions about using this project, please **REPO MAINTAINER: INSERT INSTRUCTIONS HERE | ||
FOR HOW TO ENGAGE REPO OWNERS OR COMMUNITY FOR HELP. COULD BE A STACK OVERFLOW TAG OR OTHER | ||
CHANNEL. WHERE WILL YOU HELP PEOPLE?**. | ||
|
||
## Microsoft Support Policy | ||
|
||
Support for this **PROJECT or PRODUCT** is limited to the resources listed above. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.