Skip to content
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

adding step to test for crlf line endings #16398

Merged
merged 11 commits into from
Feb 1, 2021
22 changes: 20 additions & 2 deletions eng/pipelines/templates/steps/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,24 @@ steps:
python find_invalid_versions.py --always-succeed --service=${{parameters.ServiceDirectory}}
displayName: Find Invalid Versions

- pwsh: |
Get-ChildItem .\ -Filter "*.py" |
seankane-msft marked this conversation as resolved.
Show resolved Hide resolved
Foreach-Object {
If ((Get-Content $_ -Raw) -match "\r\n") {
seankane-msft marked this conversation as resolved.
Show resolved Hide resolved
Write-Ouput $_
Throw "Found a CRLF line ending"
seankane-msft marked this conversation as resolved.
Show resolved Hide resolved
}
}

Get-ChildItem .\ -Filter "*.md" |
Foreach-Object {
If ((Get-Content $_ -Raw) -match "\r\n") {
Write-Ouput $_
Throw "Found a CRLF line ending"
seankane-msft marked this conversation as resolved.
Show resolved Hide resolved
}
}
displayName: Check for CRLF Line endings
seankane-msft marked this conversation as resolved.
Show resolved Hide resolved

- template: /eng/common/pipelines/templates/steps/verify-path-length.yml
parameters:
SourceDirectory: $(Build.SourcesDirectory)
Expand Down Expand Up @@ -58,13 +76,13 @@ steps:
arguments: '"${{ parameters.BuildTargetingString }}" --service=${{parameters.ServiceDirectory}} --toxenv=verifywhl'

- template: run_mypy.yml
parameters:
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
BuildTargetingString: ${{ parameters.BuildTargetingString }}
TestMarkArgument: ${{ parameters.TestMarkArgument }}

- template: run_pylint.yml
parameters:
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
BuildTargetingString: ${{ parameters.BuildTargetingString }}
TestMarkArgument: ${{ parameters.TestMarkArgument }}
Expand Down