Skip to content

Commit 266c2e7

Browse files
authored
Merge pull request #4463 from DataDog/tonycthsu/yamllint
Scan with `yamllint`
2 parents 4eb6123 + e4e739b commit 266c2e7

35 files changed

+214
-211
lines changed

.github/labeler.yml

+14-14
Original file line numberDiff line numberDiff line change
@@ -3,69 +3,69 @@
33

44
core:
55
- changed-files:
6-
- any-glob-to-any-file: [ 'lib/datadog/core/**' ]
6+
- any-glob-to-any-file: ['lib/datadog/core/**']
77

88
# Only documentation changes
99
docs:
1010
- changed-files:
11-
- all-globs-to-all-files: [ '**/*.md' ]
11+
- all-globs-to-all-files: ['**/*.md']
1212

1313
# Only test changes
1414
dev/testing:
1515
- changed-files:
16-
- all-globs-to-all-files: [ '{spec/**,integration/**,benchmarks/**}' ]
16+
- all-globs-to-all-files: ['{spec/**,integration/**,benchmarks/**}']
1717

1818
# Changes to Profiling
1919
profiling:
2020
- changed-files:
21-
- any-glob-to-any-file: [ '{lib/datadog/profiling/**,ext/datadog_profiling_native_extension/**}' ]
21+
- any-glob-to-any-file: ['{lib/datadog/profiling/**,ext/datadog_profiling_native_extension/**}']
2222

2323
# Changes to CI-App
2424
ci-app:
2525
- changed-files:
26-
- any-glob-to-any-file: [ 'lib/datadog/ci/**' ]
26+
- any-glob-to-any-file: ['lib/datadog/ci/**']
2727

2828
# Changes to ASM
2929
appsec:
3030
- changed-files:
31-
- any-glob-to-any-file: [ 'lib/datadog/appsec/**' ]
31+
- any-glob-to-any-file: ['lib/datadog/appsec/**']
3232

3333
# Changes to Tracing
3434
tracing:
3535
- changed-files:
36-
- any-glob-to-any-file: [ 'lib/datadog/tracing/**' ]
36+
- any-glob-to-any-file: ['lib/datadog/tracing/**']
3737

3838
# Changes to Tracing integrations
3939
integrations:
4040
- changed-files:
41-
- any-glob-to-any-file: [ '{lib/datadog/tracing/contrib/**,lib/datadog/appsec/contrib/**}' ]
41+
- any-glob-to-any-file: ['{lib/datadog/tracing/contrib/**,lib/datadog/appsec/contrib/**}']
4242

4343
# Only repository GitHub changes
4444
dev/github:
4545
- changed-files:
46-
- all-globs-to-all-files: [ '.github/**' ]
46+
- all-globs-to-all-files: ['.github/**']
4747

4848
# Only repository CI changes
4949
dev/ci:
5050
- changed-files:
51-
- all-globs-to-all-files: [ '{.circleci/**,.gitlab-ci.yml}' ]
51+
- all-globs-to-all-files: ['{.circleci/**,.gitlab-ci.yml}']
5252

5353
# Version bump pull request
5454
release:
5555
- changed-files:
56-
- all-globs-to-all-files: [ '{CHANGELOG.md,lib/datadog/version.rb}' ]
56+
- all-globs-to-all-files: ['{CHANGELOG.md,lib/datadog/version.rb}']
5757

5858
# Changes to OpenTelemetry
5959
otel:
6060
- changed-files:
61-
- any-glob-to-any-file: [ 'lib/datadog/opentelemetry/**' ]
61+
- any-glob-to-any-file: ['lib/datadog/opentelemetry/**']
6262

6363
# Changes to Single Step Instrumentation
6464
single-step:
6565
- changed-files:
66-
- any-glob-to-any-file: [ 'lib-injection/**' ]
66+
- any-glob-to-any-file: ['lib-injection/**']
6767

6868
# Changes to Debugging
6969
debugging:
7070
- changed-files:
71-
- any-glob-to-any-file: [ 'lib/datadog/debugging/**' ]
71+
- any-glob-to-any-file: ['lib/datadog/debugging/**']

.github/workflows/_unit_test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Unit Test Template
22

3-
on:
3+
on: # yamllint disable-line rule:truthy
44
workflow_call:
55
inputs:
66
# TODO: Provides concurrency control for each ruby version

.github/workflows/add-milestone-to-pull-requests.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Add milestone to merged pull requests
2-
on:
2+
3+
on: # yamllint disable-line rule:truthy
34
pull_request:
45
types: [closed]
56

.github/workflows/build-gem.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Build gem
22

3-
on:
3+
on: # yamllint disable-line rule:truthy
44
workflow_dispatch:
55
inputs:
66
push:
@@ -10,10 +10,10 @@ on:
1010
default: true
1111
push:
1212
branches:
13-
- master
13+
- master
1414
pull_request:
1515
branches:
16-
- master
16+
- master
1717

1818
# Default permissions for all jobs
1919
permissions: {}

.github/workflows/cache-cleanup.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries
33

44
name: Cleanup caches by a branch
5-
on:
5+
6+
on: # yamllint disable-line rule:truthy
67
pull_request:
78
types:
89
- closed

.github/workflows/check.yml

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name: Static Analysis
2-
on:
2+
3+
on: # yamllint disable-line rule:truthy
34
push:
45
branches:
5-
- master
6+
- master
67
pull_request:
78
branches:
8-
- master
9+
- master
910

1011
concurrency:
1112
group: ${{ github.workflow }}-${{ github.ref }}
@@ -158,6 +159,16 @@ jobs:
158159
with:
159160
args: -color
160161

162+
yaml-lint:
163+
name: yaml-lint
164+
runs-on: ubuntu-24.04
165+
steps:
166+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
167+
with:
168+
persist-credentials: false
169+
- run: pip install yamllint
170+
- run: yamllint --strict .
171+
161172
complete:
162173
name: Static Analysis (complete)
163174
needs:
@@ -169,6 +180,7 @@ jobs:
169180
- 'dd-static-analysis'
170181
- 'zizmor'
171182
- 'actionlint'
183+
- 'yaml-lint'
172184
runs-on: ubuntu-24.04
173185
steps:
174186
- run: echo "Done"

.github/workflows/codeql-analysis.yml

+26-26
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: "CodeQL"
22

3-
on:
3+
on: # yamllint disable-line rule:truthy
44
push:
5-
branches: [ master, release ]
5+
branches: [master, release]
66
pull_request:
77
# The branches below must be a subset of the branches above
8-
branches: [ master ]
8+
branches: [master]
99

1010
# Default permissions for all jobs
1111
permissions: {}
@@ -22,33 +22,33 @@ jobs:
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
language: [ 'ruby' ]
25+
language: ['ruby']
2626
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
2727
# Learn more about CodeQL language support at https://git.io/codeql-language-support
2828

2929
steps:
30-
- name: Checkout repository
31-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
32-
with:
33-
persist-credentials: false
34-
35-
# Initializes the CodeQL tools for scanning.
36-
- name: Initialize CodeQL
37-
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
38-
with:
39-
languages: ${{ matrix.language }}
40-
# If you wish to specify custom queries, you can do so here or in a config file.
41-
# By default, queries listed here will override any specified in a config file.
42-
# Prefix the list here with "+" to use these queries and those in the config file.
43-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
44-
45-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
46-
# If this step fails, then you should remove it and run the build manually
47-
- name: Autobuild
48-
uses: github/codeql-action/autobuild@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
49-
50-
- name: Perform CodeQL Analysis
51-
uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
30+
- name: Checkout repository
31+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
32+
with:
33+
persist-credentials: false
34+
35+
# Initializes the CodeQL tools for scanning.
36+
- name: Initialize CodeQL
37+
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
38+
with:
39+
languages: ${{ matrix.language }}
40+
# If you wish to specify custom queries, you can do so here or in a config file.
41+
# By default, queries listed here will override any specified in a config file.
42+
# Prefix the list here with "+" to use these queries and those in the config file.
43+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
44+
45+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
46+
# If this step fails, then you should remove it and run the build manually
47+
- name: Autobuild
48+
uses: github/codeql-action/autobuild@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
49+
50+
- name: Perform CodeQL Analysis
51+
uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
5252

5353
complete:
5454
name: CodeQL (complete)

.github/workflows/ensure-changelog-entry.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Check change log entry
2-
on:
2+
3+
on: # yamllint disable-line rule:truthy
34
pull_request:
45
types: [opened, reopened, edited]
56

.github/workflows/generate-supported-versions.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "Generate Supported Versions"
22

3-
on:
3+
on: # yamllint disable-line rule:truthy
44
workflow_dispatch:
55

66
concurrency:
@@ -47,4 +47,3 @@ jobs:
4747
Workflow run: [Generate Supported Versions](https://github.com/DataDog/dd-trace-rb/actions/workflows/generate-supported-versions.yml)
4848
4949
This should be tied to tracer releases, or triggered manually.
50-

.github/workflows/lock-dependency.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Lock Dependencies
33
# TODO: Make this job mandatory
44
# TODO: Make this on workflow_dispatch
55

6-
on:
6+
on: # yamllint disable-line rule:truthy
77
pull_request:
88
branches:
9-
- master
9+
- master
1010

1111
concurrency:
1212
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/nix.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: Test Nix
22

3-
on:
3+
on: # yamllint disable-line rule:truthy
44
push:
55
branches:
6-
- master
6+
- master
77
pull_request:
88
branches:
9-
- master
9+
- master
1010

1111
# Default permissions for all jobs
1212
permissions: {}

.github/workflows/parametric-tests.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: Parametric Tests
22

3-
on:
3+
on: # yamllint disable-line rule:truthy
44
push:
55
branches:
6-
- master
6+
- master
77
pull_request:
88
branches:
9-
- master
9+
- master
1010
workflow_dispatch: {}
1111
schedule:
1212
- cron: "00 04 * * 2-6"

.github/workflows/publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Publish gem
22

33
# TODO: Implement a dry-run mode to verify the checks without publishing
4-
on: workflow_dispatch
4+
on: workflow_dispatch # yamllint disable-line rule:truthy
55

66
concurrency: "rubygems" # Only one publish job at a time
77

.github/workflows/pull-request-labeler.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: "Pull Request Labeler"
2-
on:
2+
3+
on: # yamllint disable-line rule:truthy
34
- pull_request_target # zizmor: ignore[dangerous-triggers]
45

56
jobs:

.github/workflows/system-tests.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: System Tests
22

3-
on:
3+
on: # yamllint disable-line rule:truthy
44
push:
55
branches:
6-
- master
6+
- master
77
pull_request:
88
branches:
9-
- master
9+
- master
1010
workflow_dispatch: {}
1111
schedule:
1212
- cron: "00 04 * * 2-6"

.github/workflows/test-macos.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name: Test macOS
2-
on:
2+
3+
on: # yamllint disable-line rule:truthy
34
push:
45
branches:
5-
- master
6+
- master
67
pull_request:
78
branches:
8-
- master
9+
- master
910

1011
# Default permissions for all jobs
1112
permissions: {}

.github/workflows/test-memory-leaks.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name: Test for memory leaks
2-
on:
2+
3+
on: # yamllint disable-line rule:truthy
34
push:
45
branches:
5-
- master
6+
- master
67
pull_request:
78
branches:
8-
- master
9+
- master
910

1011
# Default permissions for all jobs
1112
permissions: {}

.github/workflows/test-yjit.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name: Test YJIT
2-
on:
2+
3+
on: # yamllint disable-line rule:truthy
34
push:
45
branches:
5-
- master
6+
- master
67
pull_request:
78
branches:
8-
- master
9+
- master
910

1011
# Default permissions for all jobs
1112
permissions: {}

0 commit comments

Comments
 (0)