Skip to content

Commit d5e7384

Browse files
committed
Strip trailing whitespace generated by ruamel-yaml
1 parent 756aa64 commit d5e7384

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

.github/workflows/debug-artifacts-failure.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
run: ./build.sh
5151
- uses: ./../action/analyze
5252
id: analysis
53-
env:
53+
env:
5454
# Forces a failure in this step.
5555
CODEQL_ACTION_EXTRA_OPTIONS: '{ "database": { "finalize": ["--invalid-option"] } }'
5656
with:

.github/workflows/debug-artifacts-legacy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
debug-artifact-name: my-debug-artifacts
5757
debug-database-name: my-db
5858
# We manually exclude Swift from the languages list here, as it is not supported on Ubuntu
59-
languages: cpp,csharp,go,java,javascript,python,ruby
59+
languages: cpp,csharp,go,java,javascript,python,ruby
6060
- name: Build code
6161
shell: bash
6262
run: ./build.sh

.github/workflows/debug-artifacts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
debug-artifact-name: my-debug-artifacts
5656
debug-database-name: my-db
5757
# We manually exclude Swift from the languages list here, as it is not supported on Ubuntu
58-
languages: cpp,csharp,go,java,javascript,python,ruby
58+
languages: cpp,csharp,go,java,javascript,python,ruby
5959
- name: Build code
6060
shell: bash
6161
run: ./build.sh

pr-checks/sync.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from ruamel.yaml.scalarstring import FoldedScalarString, SingleQuotedScalarString
55
import pathlib
66
import textwrap
7+
import os
78

89
# The default set of CodeQL Bundle versions to use for the PR checks.
910
defaultTestVersions = [
@@ -153,7 +154,8 @@ def writeHeader(checkStream):
153154
checkJob['env']['CODEQL_ACTION_TEST_MODE'] = True
154155
checkName = file.stem
155156

156-
with open(this_dir.parent / ".github" / "workflows" / f"__{checkName}.yml", 'w') as output_stream:
157+
raw_file = this_dir.parent / ".github" / "workflows" / f"__{checkName}.yml.raw"
158+
with open(raw_file, 'w') as output_stream:
157159
writeHeader(output_stream)
158160
yaml.dump({
159161
'name': f"PR Check - {checkSpecification['name']}",
@@ -175,3 +177,9 @@ def writeHeader(checkStream):
175177
checkName: checkJob
176178
}
177179
}, output_stream)
180+
181+
with open(raw_file, 'r') as input_stream:
182+
with open(this_dir.parent / ".github" / "workflows" / f"__{checkName}.yml", 'w') as output_stream:
183+
content = input_stream.read()
184+
output_stream.write("\n".join(list(map(lambda x:x.rstrip(), content.splitlines()))+['']))
185+
os.remove(raw_file)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy