@oddessentials/repo-standards 1.2.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -1
- package/dist/config/standards.csharp-dotnet.azure-devops.json +74 -6
- package/dist/config/standards.csharp-dotnet.github-actions.json +74 -6
- package/dist/config/standards.csharp-dotnet.json +74 -6
- package/dist/config/standards.go.azure-devops.json +74 -0
- package/dist/config/standards.go.github-actions.json +74 -0
- package/dist/config/standards.go.json +74 -0
- package/dist/config/standards.json +250 -32
- package/dist/config/standards.python.azure-devops.json +86 -18
- package/dist/config/standards.python.github-actions.json +86 -18
- package/dist/config/standards.python.json +86 -18
- package/dist/config/standards.rust.azure-devops.json +74 -0
- package/dist/config/standards.rust.github-actions.json +74 -0
- package/dist/config/standards.rust.json +74 -0
- package/dist/config/standards.typescript-js.azure-devops.json +90 -8
- package/dist/config/standards.typescript-js.github-actions.json +90 -8
- package/dist/config/standards.typescript-js.json +90 -8
- package/dist/types.d.ts +13 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -101,7 +101,7 @@ Each checklist item includes:
|
|
|
101
101
|
The `version` field indicates schema compatibility:
|
|
102
102
|
|
|
103
103
|
- `1` — Original schema
|
|
104
|
-
- `2` — Adds `
|
|
104
|
+
- `2` — Adds `bazelHints`, `meta.bazelIntegration` for Bazel support, `anyOfFiles`, `pinningNotes`
|
|
105
105
|
|
|
106
106
|
Consumers should ignore unknown fields for forward compatibility.
|
|
107
107
|
|
|
@@ -144,6 +144,84 @@ Required secrets:
|
|
|
144
144
|
|
|
145
145
|
---
|
|
146
146
|
|
|
147
|
+
## Bazel Integration
|
|
148
|
+
|
|
149
|
+
This framework supports Bazel as an **optional build executor** for quality checks.
|
|
150
|
+
|
|
151
|
+
### Key Concepts
|
|
152
|
+
|
|
153
|
+
- **Bazel is optional** — Stack-native commands (npm, cargo, etc.) remain the default
|
|
154
|
+
- **Hints are advisory** — `bazelHints` are suggestions, not required execution paths
|
|
155
|
+
- **Commands are illustrative** — Actual Bazel commands are repo-defined; examples show patterns only
|
|
156
|
+
- **Detection is root-level** — Only `MODULE.bazel` / `WORKSPACE*` at repo root triggers Bazel mode
|
|
157
|
+
|
|
158
|
+
### Detection Rules
|
|
159
|
+
|
|
160
|
+
Repos are detected as Bazel-managed if the **repository root** contains:
|
|
161
|
+
|
|
162
|
+
1. `MODULE.bazel` (bzlmod, preferred)
|
|
163
|
+
2. `WORKSPACE.bazel` or `WORKSPACE` (legacy)
|
|
164
|
+
|
|
165
|
+
Optional markers: `.bazelrc`, `.bazelversion`
|
|
166
|
+
|
|
167
|
+
> Nested `BUILD.bazel` files (e.g., from vendored deps) do NOT trigger Bazel detection.
|
|
168
|
+
|
|
169
|
+
### Bazel Commands (Not Assumed Targets)
|
|
170
|
+
|
|
171
|
+
The `bazelHints.commands` field contains **actual commands to run**:
|
|
172
|
+
|
|
173
|
+
| Check | Stack-native | Bazel Command |
|
|
174
|
+
| ------------ | ---------------------- | -------------------------------- |
|
|
175
|
+
| Lint | `npm run lint` | `bazel test //... --aspects=...` |
|
|
176
|
+
| Format Check | `npm run format:check` | `bazel run //tools/format:check` |
|
|
177
|
+
| Type Check | `npm run typecheck` | `bazel build //...` |
|
|
178
|
+
| Test | `npm test` | `bazel test //...` |
|
|
179
|
+
| Coverage | `npm run coverage` | `bazel coverage //...` |
|
|
180
|
+
|
|
181
|
+
> **Note**: Bazel commands shown are **illustrative patterns**. Actual targets (e.g., `//tools/lint:lint`, `//...:format_test`) are repo-defined and may not exist without explicit Bazel setup. `bazelHints` are advisory—consumers should prefer stack-native commands unless explicitly adopting Bazel.
|
|
182
|
+
|
|
183
|
+
### Minimal `.bazelrc` for CI
|
|
184
|
+
|
|
185
|
+
```bazelrc
|
|
186
|
+
# .bazelrc
|
|
187
|
+
build:ci --nokeep_going
|
|
188
|
+
build:ci --test_output=errors
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Example GitHub Actions
|
|
192
|
+
|
|
193
|
+
```yaml
|
|
194
|
+
- uses: bazel-contrib/setup-bazel@0.14.0
|
|
195
|
+
with:
|
|
196
|
+
bazelisk-cache: true
|
|
197
|
+
|
|
198
|
+
- run: bazel test //... --config=ci
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Example Azure DevOps
|
|
202
|
+
|
|
203
|
+
```yaml
|
|
204
|
+
- script: |
|
|
205
|
+
curl -Lo bazelisk https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64
|
|
206
|
+
chmod +x bazelisk && mv bazelisk /usr/local/bin/bazel
|
|
207
|
+
displayName: "Install Bazelisk"
|
|
208
|
+
|
|
209
|
+
- script: bazel test //... --config=ci
|
|
210
|
+
displayName: "Run Bazel Tests"
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
> Remote cache is optional and not required for basic CI.
|
|
214
|
+
|
|
215
|
+
### Opt-Out
|
|
216
|
+
|
|
217
|
+
To disable Bazel hints for a repo that contains Bazel files but uses npm for quality checks:
|
|
218
|
+
|
|
219
|
+
```json
|
|
220
|
+
{ "meta": { "bazelIntegration": { "enabled": false } } }
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
147
225
|
## Generating Stack-Specific JSON
|
|
148
226
|
|
|
149
227
|
The generator reads the master spec and produces filtered, deterministic outputs.
|
|
@@ -35,6 +35,12 @@
|
|
|
35
35
|
"id": "linting",
|
|
36
36
|
"label": "Linting",
|
|
37
37
|
"stack": {
|
|
38
|
+
"bazelHints": {
|
|
39
|
+
"commands": [
|
|
40
|
+
"bazel build //... --aspects=@rules_dotnet//dotnet:analyzers.bzl%analyzer_aspect"
|
|
41
|
+
],
|
|
42
|
+
"notes": "Example only; actual targets are repo-defined. Use rules_dotnet analyzer aspects for Roslyn-based linting."
|
|
43
|
+
},
|
|
38
44
|
"exampleConfigFiles": [
|
|
39
45
|
".editorconfig",
|
|
40
46
|
"Directory.Build.props"
|
|
@@ -50,9 +56,6 @@
|
|
|
50
56
|
"requiredFiles": [
|
|
51
57
|
".editorconfig"
|
|
52
58
|
],
|
|
53
|
-
"requiredScripts": [
|
|
54
|
-
"lint"
|
|
55
|
-
],
|
|
56
59
|
"verification": ".editorconfig must exist to drive the .NET formatting and analysis tooling."
|
|
57
60
|
}
|
|
58
61
|
},
|
|
@@ -66,6 +69,12 @@
|
|
|
66
69
|
"id": "unit-test-runner",
|
|
67
70
|
"label": "Unit Test Runner",
|
|
68
71
|
"stack": {
|
|
72
|
+
"bazelHints": {
|
|
73
|
+
"commands": [
|
|
74
|
+
"bazel test //..."
|
|
75
|
+
],
|
|
76
|
+
"notes": "Use rules_dotnet to define test targets for xUnit/NUnit/MSTest projects."
|
|
77
|
+
},
|
|
69
78
|
"exampleConfigFiles": [
|
|
70
79
|
"*.Tests.csproj"
|
|
71
80
|
],
|
|
@@ -160,6 +169,12 @@
|
|
|
160
169
|
"id": "unit-test-reporter",
|
|
161
170
|
"label": "Unit Test Reporter / Coverage",
|
|
162
171
|
"stack": {
|
|
172
|
+
"bazelHints": {
|
|
173
|
+
"commands": [
|
|
174
|
+
"bazel coverage //..."
|
|
175
|
+
],
|
|
176
|
+
"notes": "Use rules_dotnet with coverage instrumentation enabled."
|
|
177
|
+
},
|
|
163
178
|
"exampleConfigFiles": [
|
|
164
179
|
"*.csproj"
|
|
165
180
|
],
|
|
@@ -181,6 +196,13 @@
|
|
|
181
196
|
"id": "ci-quality-gates",
|
|
182
197
|
"label": "CI Quality Gates",
|
|
183
198
|
"stack": {
|
|
199
|
+
"bazelHints": {
|
|
200
|
+
"commands": [
|
|
201
|
+
"bazel build //...",
|
|
202
|
+
"bazel test //..."
|
|
203
|
+
],
|
|
204
|
+
"notes": "Bazel handles all analysis, testing, and packaging via defined targets."
|
|
205
|
+
},
|
|
184
206
|
"exampleConfigFiles": [
|
|
185
207
|
".github/workflows/*",
|
|
186
208
|
"azure-pipelines.yml"
|
|
@@ -200,6 +222,12 @@
|
|
|
200
222
|
"id": "code-formatter",
|
|
201
223
|
"label": "Code Formatter",
|
|
202
224
|
"stack": {
|
|
225
|
+
"bazelHints": {
|
|
226
|
+
"commands": [
|
|
227
|
+
"bazel run //tools/format:dotnet_format -- --verify-no-changes"
|
|
228
|
+
],
|
|
229
|
+
"notes": "Wrap dotnet format as a Bazel run target."
|
|
230
|
+
},
|
|
203
231
|
"exampleConfigFiles": [
|
|
204
232
|
".editorconfig"
|
|
205
233
|
],
|
|
@@ -240,6 +268,12 @@
|
|
|
240
268
|
"id": "type-checking",
|
|
241
269
|
"label": "Type Checking",
|
|
242
270
|
"stack": {
|
|
271
|
+
"bazelHints": {
|
|
272
|
+
"commands": [
|
|
273
|
+
"bazel build //..."
|
|
274
|
+
],
|
|
275
|
+
"notes": "Example only; actual targets are repo-defined. C# type errors surface during bazel build with rules_dotnet."
|
|
276
|
+
},
|
|
243
277
|
"exampleConfigFiles": [
|
|
244
278
|
".editorconfig",
|
|
245
279
|
"Directory.Build.props",
|
|
@@ -255,9 +289,6 @@
|
|
|
255
289
|
"requiredFiles": [
|
|
256
290
|
".editorconfig"
|
|
257
291
|
],
|
|
258
|
-
"requiredScripts": [
|
|
259
|
-
"typecheck"
|
|
260
|
-
],
|
|
261
292
|
"verification": ".editorconfig must exist; Directory.Build.props is optional for shared build configuration."
|
|
262
293
|
}
|
|
263
294
|
},
|
|
@@ -530,6 +561,43 @@
|
|
|
530
561
|
"azure-devops"
|
|
531
562
|
],
|
|
532
563
|
"meta": {
|
|
564
|
+
"bazelIntegration": {
|
|
565
|
+
"advisoryNotice": "bazelHints are suggestions, not required execution paths. Consumers should prefer stack-native commands unless explicitly adopting Bazel.",
|
|
566
|
+
"ciContract": {
|
|
567
|
+
"configFlag": "--config=ci (define in .bazelrc)",
|
|
568
|
+
"deterministicFlags": [
|
|
569
|
+
"--nokeep_going",
|
|
570
|
+
"--test_output=errors"
|
|
571
|
+
],
|
|
572
|
+
"remoteCache": "Optional; not required for CI",
|
|
573
|
+
"versionPinning": "Use .bazelversion file for Bazelisk"
|
|
574
|
+
},
|
|
575
|
+
"description": "Bazel build executor support for quality checks. All hints are ADVISORY—stack-native commands remain the default execution path.",
|
|
576
|
+
"detectionRules": {
|
|
577
|
+
"notes": "Detection uses repo-root markers only. Nested BUILD files do not trigger Bazel mode.",
|
|
578
|
+
"optionalMarkers": [
|
|
579
|
+
".bazelrc",
|
|
580
|
+
".bazelversion"
|
|
581
|
+
],
|
|
582
|
+
"rootMarkers": [
|
|
583
|
+
"MODULE.bazel",
|
|
584
|
+
"WORKSPACE.bazel",
|
|
585
|
+
"WORKSPACE"
|
|
586
|
+
]
|
|
587
|
+
},
|
|
588
|
+
"optOut": {
|
|
589
|
+
"configPath": "meta.bazelIntegration.enabled",
|
|
590
|
+
"description": "Set meta.bazelIntegration.enabled = false in repo config to disable Bazel hints"
|
|
591
|
+
},
|
|
592
|
+
"targetConventions": {
|
|
593
|
+
"build": "bazel build //...",
|
|
594
|
+
"coverage": "bazel coverage //...",
|
|
595
|
+
"description": "Recommended target naming (not assumed to exist). These are illustrative patterns; actual targets are repo-defined.",
|
|
596
|
+
"format": "bazel run //tools/format:check",
|
|
597
|
+
"lint": "//tools/lint:lint or bazel test //... with lint aspects",
|
|
598
|
+
"test": "bazel test //..."
|
|
599
|
+
}
|
|
600
|
+
},
|
|
533
601
|
"complexityChecks": {
|
|
534
602
|
"description": "When supported by the stack, run cyclomatic complexity or similar metrics in CI as a warning-only check initially.",
|
|
535
603
|
"enabledByDefault": true
|
|
@@ -35,6 +35,12 @@
|
|
|
35
35
|
"id": "linting",
|
|
36
36
|
"label": "Linting",
|
|
37
37
|
"stack": {
|
|
38
|
+
"bazelHints": {
|
|
39
|
+
"commands": [
|
|
40
|
+
"bazel build //... --aspects=@rules_dotnet//dotnet:analyzers.bzl%analyzer_aspect"
|
|
41
|
+
],
|
|
42
|
+
"notes": "Example only; actual targets are repo-defined. Use rules_dotnet analyzer aspects for Roslyn-based linting."
|
|
43
|
+
},
|
|
38
44
|
"exampleConfigFiles": [
|
|
39
45
|
".editorconfig",
|
|
40
46
|
"Directory.Build.props"
|
|
@@ -50,9 +56,6 @@
|
|
|
50
56
|
"requiredFiles": [
|
|
51
57
|
".editorconfig"
|
|
52
58
|
],
|
|
53
|
-
"requiredScripts": [
|
|
54
|
-
"lint"
|
|
55
|
-
],
|
|
56
59
|
"verification": ".editorconfig must exist to drive the .NET formatting and analysis tooling."
|
|
57
60
|
}
|
|
58
61
|
},
|
|
@@ -66,6 +69,12 @@
|
|
|
66
69
|
"id": "unit-test-runner",
|
|
67
70
|
"label": "Unit Test Runner",
|
|
68
71
|
"stack": {
|
|
72
|
+
"bazelHints": {
|
|
73
|
+
"commands": [
|
|
74
|
+
"bazel test //..."
|
|
75
|
+
],
|
|
76
|
+
"notes": "Use rules_dotnet to define test targets for xUnit/NUnit/MSTest projects."
|
|
77
|
+
},
|
|
69
78
|
"exampleConfigFiles": [
|
|
70
79
|
"*.Tests.csproj"
|
|
71
80
|
],
|
|
@@ -160,6 +169,12 @@
|
|
|
160
169
|
"id": "unit-test-reporter",
|
|
161
170
|
"label": "Unit Test Reporter / Coverage",
|
|
162
171
|
"stack": {
|
|
172
|
+
"bazelHints": {
|
|
173
|
+
"commands": [
|
|
174
|
+
"bazel coverage //..."
|
|
175
|
+
],
|
|
176
|
+
"notes": "Use rules_dotnet with coverage instrumentation enabled."
|
|
177
|
+
},
|
|
163
178
|
"exampleConfigFiles": [
|
|
164
179
|
"*.csproj"
|
|
165
180
|
],
|
|
@@ -181,6 +196,13 @@
|
|
|
181
196
|
"id": "ci-quality-gates",
|
|
182
197
|
"label": "CI Quality Gates",
|
|
183
198
|
"stack": {
|
|
199
|
+
"bazelHints": {
|
|
200
|
+
"commands": [
|
|
201
|
+
"bazel build //...",
|
|
202
|
+
"bazel test //..."
|
|
203
|
+
],
|
|
204
|
+
"notes": "Bazel handles all analysis, testing, and packaging via defined targets."
|
|
205
|
+
},
|
|
184
206
|
"exampleConfigFiles": [
|
|
185
207
|
".github/workflows/*",
|
|
186
208
|
"azure-pipelines.yml"
|
|
@@ -200,6 +222,12 @@
|
|
|
200
222
|
"id": "code-formatter",
|
|
201
223
|
"label": "Code Formatter",
|
|
202
224
|
"stack": {
|
|
225
|
+
"bazelHints": {
|
|
226
|
+
"commands": [
|
|
227
|
+
"bazel run //tools/format:dotnet_format -- --verify-no-changes"
|
|
228
|
+
],
|
|
229
|
+
"notes": "Wrap dotnet format as a Bazel run target."
|
|
230
|
+
},
|
|
203
231
|
"exampleConfigFiles": [
|
|
204
232
|
".editorconfig"
|
|
205
233
|
],
|
|
@@ -240,6 +268,12 @@
|
|
|
240
268
|
"id": "type-checking",
|
|
241
269
|
"label": "Type Checking",
|
|
242
270
|
"stack": {
|
|
271
|
+
"bazelHints": {
|
|
272
|
+
"commands": [
|
|
273
|
+
"bazel build //..."
|
|
274
|
+
],
|
|
275
|
+
"notes": "Example only; actual targets are repo-defined. C# type errors surface during bazel build with rules_dotnet."
|
|
276
|
+
},
|
|
243
277
|
"exampleConfigFiles": [
|
|
244
278
|
".editorconfig",
|
|
245
279
|
"Directory.Build.props",
|
|
@@ -255,9 +289,6 @@
|
|
|
255
289
|
"requiredFiles": [
|
|
256
290
|
".editorconfig"
|
|
257
291
|
],
|
|
258
|
-
"requiredScripts": [
|
|
259
|
-
"typecheck"
|
|
260
|
-
],
|
|
261
292
|
"verification": ".editorconfig must exist; Directory.Build.props is optional for shared build configuration."
|
|
262
293
|
}
|
|
263
294
|
},
|
|
@@ -530,6 +561,43 @@
|
|
|
530
561
|
"github-actions"
|
|
531
562
|
],
|
|
532
563
|
"meta": {
|
|
564
|
+
"bazelIntegration": {
|
|
565
|
+
"advisoryNotice": "bazelHints are suggestions, not required execution paths. Consumers should prefer stack-native commands unless explicitly adopting Bazel.",
|
|
566
|
+
"ciContract": {
|
|
567
|
+
"configFlag": "--config=ci (define in .bazelrc)",
|
|
568
|
+
"deterministicFlags": [
|
|
569
|
+
"--nokeep_going",
|
|
570
|
+
"--test_output=errors"
|
|
571
|
+
],
|
|
572
|
+
"remoteCache": "Optional; not required for CI",
|
|
573
|
+
"versionPinning": "Use .bazelversion file for Bazelisk"
|
|
574
|
+
},
|
|
575
|
+
"description": "Bazel build executor support for quality checks. All hints are ADVISORY—stack-native commands remain the default execution path.",
|
|
576
|
+
"detectionRules": {
|
|
577
|
+
"notes": "Detection uses repo-root markers only. Nested BUILD files do not trigger Bazel mode.",
|
|
578
|
+
"optionalMarkers": [
|
|
579
|
+
".bazelrc",
|
|
580
|
+
".bazelversion"
|
|
581
|
+
],
|
|
582
|
+
"rootMarkers": [
|
|
583
|
+
"MODULE.bazel",
|
|
584
|
+
"WORKSPACE.bazel",
|
|
585
|
+
"WORKSPACE"
|
|
586
|
+
]
|
|
587
|
+
},
|
|
588
|
+
"optOut": {
|
|
589
|
+
"configPath": "meta.bazelIntegration.enabled",
|
|
590
|
+
"description": "Set meta.bazelIntegration.enabled = false in repo config to disable Bazel hints"
|
|
591
|
+
},
|
|
592
|
+
"targetConventions": {
|
|
593
|
+
"build": "bazel build //...",
|
|
594
|
+
"coverage": "bazel coverage //...",
|
|
595
|
+
"description": "Recommended target naming (not assumed to exist). These are illustrative patterns; actual targets are repo-defined.",
|
|
596
|
+
"format": "bazel run //tools/format:check",
|
|
597
|
+
"lint": "//tools/lint:lint or bazel test //... with lint aspects",
|
|
598
|
+
"test": "bazel test //..."
|
|
599
|
+
}
|
|
600
|
+
},
|
|
533
601
|
"complexityChecks": {
|
|
534
602
|
"description": "When supported by the stack, run cyclomatic complexity or similar metrics in CI as a warning-only check initially.",
|
|
535
603
|
"enabledByDefault": true
|
|
@@ -41,6 +41,12 @@
|
|
|
41
41
|
"id": "linting",
|
|
42
42
|
"label": "Linting",
|
|
43
43
|
"stack": {
|
|
44
|
+
"bazelHints": {
|
|
45
|
+
"commands": [
|
|
46
|
+
"bazel build //... --aspects=@rules_dotnet//dotnet:analyzers.bzl%analyzer_aspect"
|
|
47
|
+
],
|
|
48
|
+
"notes": "Example only; actual targets are repo-defined. Use rules_dotnet analyzer aspects for Roslyn-based linting."
|
|
49
|
+
},
|
|
44
50
|
"exampleConfigFiles": [
|
|
45
51
|
".editorconfig",
|
|
46
52
|
"Directory.Build.props"
|
|
@@ -56,9 +62,6 @@
|
|
|
56
62
|
"requiredFiles": [
|
|
57
63
|
".editorconfig"
|
|
58
64
|
],
|
|
59
|
-
"requiredScripts": [
|
|
60
|
-
"lint"
|
|
61
|
-
],
|
|
62
65
|
"verification": ".editorconfig must exist to drive the .NET formatting and analysis tooling."
|
|
63
66
|
}
|
|
64
67
|
},
|
|
@@ -75,6 +78,12 @@
|
|
|
75
78
|
"id": "unit-test-runner",
|
|
76
79
|
"label": "Unit Test Runner",
|
|
77
80
|
"stack": {
|
|
81
|
+
"bazelHints": {
|
|
82
|
+
"commands": [
|
|
83
|
+
"bazel test //..."
|
|
84
|
+
],
|
|
85
|
+
"notes": "Use rules_dotnet to define test targets for xUnit/NUnit/MSTest projects."
|
|
86
|
+
},
|
|
78
87
|
"exampleConfigFiles": [
|
|
79
88
|
"*.Tests.csproj"
|
|
80
89
|
],
|
|
@@ -181,6 +190,12 @@
|
|
|
181
190
|
"id": "unit-test-reporter",
|
|
182
191
|
"label": "Unit Test Reporter / Coverage",
|
|
183
192
|
"stack": {
|
|
193
|
+
"bazelHints": {
|
|
194
|
+
"commands": [
|
|
195
|
+
"bazel coverage //..."
|
|
196
|
+
],
|
|
197
|
+
"notes": "Use rules_dotnet with coverage instrumentation enabled."
|
|
198
|
+
},
|
|
184
199
|
"exampleConfigFiles": [
|
|
185
200
|
"*.csproj"
|
|
186
201
|
],
|
|
@@ -205,6 +220,13 @@
|
|
|
205
220
|
"id": "ci-quality-gates",
|
|
206
221
|
"label": "CI Quality Gates",
|
|
207
222
|
"stack": {
|
|
223
|
+
"bazelHints": {
|
|
224
|
+
"commands": [
|
|
225
|
+
"bazel build //...",
|
|
226
|
+
"bazel test //..."
|
|
227
|
+
],
|
|
228
|
+
"notes": "Bazel handles all analysis, testing, and packaging via defined targets."
|
|
229
|
+
},
|
|
208
230
|
"exampleConfigFiles": [
|
|
209
231
|
".github/workflows/*",
|
|
210
232
|
"azure-pipelines.yml"
|
|
@@ -227,6 +249,12 @@
|
|
|
227
249
|
"id": "code-formatter",
|
|
228
250
|
"label": "Code Formatter",
|
|
229
251
|
"stack": {
|
|
252
|
+
"bazelHints": {
|
|
253
|
+
"commands": [
|
|
254
|
+
"bazel run //tools/format:dotnet_format -- --verify-no-changes"
|
|
255
|
+
],
|
|
256
|
+
"notes": "Wrap dotnet format as a Bazel run target."
|
|
257
|
+
},
|
|
230
258
|
"exampleConfigFiles": [
|
|
231
259
|
".editorconfig"
|
|
232
260
|
],
|
|
@@ -273,6 +301,12 @@
|
|
|
273
301
|
"id": "type-checking",
|
|
274
302
|
"label": "Type Checking",
|
|
275
303
|
"stack": {
|
|
304
|
+
"bazelHints": {
|
|
305
|
+
"commands": [
|
|
306
|
+
"bazel build //..."
|
|
307
|
+
],
|
|
308
|
+
"notes": "Example only; actual targets are repo-defined. C# type errors surface during bazel build with rules_dotnet."
|
|
309
|
+
},
|
|
276
310
|
"exampleConfigFiles": [
|
|
277
311
|
".editorconfig",
|
|
278
312
|
"Directory.Build.props",
|
|
@@ -288,9 +322,6 @@
|
|
|
288
322
|
"requiredFiles": [
|
|
289
323
|
".editorconfig"
|
|
290
324
|
],
|
|
291
|
-
"requiredScripts": [
|
|
292
|
-
"typecheck"
|
|
293
|
-
],
|
|
294
325
|
"verification": ".editorconfig must exist; Directory.Build.props is optional for shared build configuration."
|
|
295
326
|
}
|
|
296
327
|
},
|
|
@@ -599,6 +630,43 @@
|
|
|
599
630
|
"github-actions"
|
|
600
631
|
],
|
|
601
632
|
"meta": {
|
|
633
|
+
"bazelIntegration": {
|
|
634
|
+
"advisoryNotice": "bazelHints are suggestions, not required execution paths. Consumers should prefer stack-native commands unless explicitly adopting Bazel.",
|
|
635
|
+
"ciContract": {
|
|
636
|
+
"configFlag": "--config=ci (define in .bazelrc)",
|
|
637
|
+
"deterministicFlags": [
|
|
638
|
+
"--nokeep_going",
|
|
639
|
+
"--test_output=errors"
|
|
640
|
+
],
|
|
641
|
+
"remoteCache": "Optional; not required for CI",
|
|
642
|
+
"versionPinning": "Use .bazelversion file for Bazelisk"
|
|
643
|
+
},
|
|
644
|
+
"description": "Bazel build executor support for quality checks. All hints are ADVISORY—stack-native commands remain the default execution path.",
|
|
645
|
+
"detectionRules": {
|
|
646
|
+
"notes": "Detection uses repo-root markers only. Nested BUILD files do not trigger Bazel mode.",
|
|
647
|
+
"optionalMarkers": [
|
|
648
|
+
".bazelrc",
|
|
649
|
+
".bazelversion"
|
|
650
|
+
],
|
|
651
|
+
"rootMarkers": [
|
|
652
|
+
"MODULE.bazel",
|
|
653
|
+
"WORKSPACE.bazel",
|
|
654
|
+
"WORKSPACE"
|
|
655
|
+
]
|
|
656
|
+
},
|
|
657
|
+
"optOut": {
|
|
658
|
+
"configPath": "meta.bazelIntegration.enabled",
|
|
659
|
+
"description": "Set meta.bazelIntegration.enabled = false in repo config to disable Bazel hints"
|
|
660
|
+
},
|
|
661
|
+
"targetConventions": {
|
|
662
|
+
"build": "bazel build //...",
|
|
663
|
+
"coverage": "bazel coverage //...",
|
|
664
|
+
"description": "Recommended target naming (not assumed to exist). These are illustrative patterns; actual targets are repo-defined.",
|
|
665
|
+
"format": "bazel run //tools/format:check",
|
|
666
|
+
"lint": "//tools/lint:lint or bazel test //... with lint aspects",
|
|
667
|
+
"test": "bazel test //..."
|
|
668
|
+
}
|
|
669
|
+
},
|
|
602
670
|
"complexityChecks": {
|
|
603
671
|
"description": "When supported by the stack, run cyclomatic complexity or similar metrics in CI as a warning-only check initially.",
|
|
604
672
|
"enabledByDefault": true
|
|
@@ -35,6 +35,12 @@
|
|
|
35
35
|
"id": "linting",
|
|
36
36
|
"label": "Linting",
|
|
37
37
|
"stack": {
|
|
38
|
+
"bazelHints": {
|
|
39
|
+
"commands": [
|
|
40
|
+
"bazel test //... --@io_bazel_rules_go//go/config:nogo=@//:nogo"
|
|
41
|
+
],
|
|
42
|
+
"notes": "Use nogo for static analysis via rules_go. Configure nogo target with desired analyzers."
|
|
43
|
+
},
|
|
38
44
|
"exampleConfigFiles": [
|
|
39
45
|
".golangci.yml",
|
|
40
46
|
".golangci.yaml"
|
|
@@ -64,6 +70,12 @@
|
|
|
64
70
|
"id": "unit-test-runner",
|
|
65
71
|
"label": "Unit Test Runner",
|
|
66
72
|
"stack": {
|
|
73
|
+
"bazelHints": {
|
|
74
|
+
"commands": [
|
|
75
|
+
"bazel test //..."
|
|
76
|
+
],
|
|
77
|
+
"notes": "rules_go go_test targets wrap 'go test' with Bazel's caching and hermeticity."
|
|
78
|
+
},
|
|
67
79
|
"exampleConfigFiles": [
|
|
68
80
|
"go.mod"
|
|
69
81
|
],
|
|
@@ -157,6 +169,12 @@
|
|
|
157
169
|
"id": "unit-test-reporter",
|
|
158
170
|
"label": "Unit Test Reporter / Coverage",
|
|
159
171
|
"stack": {
|
|
172
|
+
"bazelHints": {
|
|
173
|
+
"commands": [
|
|
174
|
+
"bazel coverage //..."
|
|
175
|
+
],
|
|
176
|
+
"notes": "rules_go supports coverage via bazel coverage. Use --combined_report=lcov for aggregated output."
|
|
177
|
+
},
|
|
160
178
|
"exampleConfigFiles": [
|
|
161
179
|
"go.mod"
|
|
162
180
|
],
|
|
@@ -178,6 +196,13 @@
|
|
|
178
196
|
"id": "ci-quality-gates",
|
|
179
197
|
"label": "CI Quality Gates",
|
|
180
198
|
"stack": {
|
|
199
|
+
"bazelHints": {
|
|
200
|
+
"commands": [
|
|
201
|
+
"bazel build //...",
|
|
202
|
+
"bazel test //..."
|
|
203
|
+
],
|
|
204
|
+
"notes": "rules_go go_binary and go_test targets provide hermetic builds and tests."
|
|
205
|
+
},
|
|
181
206
|
"exampleConfigFiles": [
|
|
182
207
|
".github/workflows/*",
|
|
183
208
|
"azure-pipelines.yml"
|
|
@@ -197,6 +222,12 @@
|
|
|
197
222
|
"id": "code-formatter",
|
|
198
223
|
"label": "Code Formatter",
|
|
199
224
|
"stack": {
|
|
225
|
+
"bazelHints": {
|
|
226
|
+
"commands": [
|
|
227
|
+
"bazel run @go_sdk//:bin/gofmt -- -d ."
|
|
228
|
+
],
|
|
229
|
+
"notes": "Run gofmt via the Bazel-managed Go SDK for hermetic formatting checks."
|
|
230
|
+
},
|
|
200
231
|
"exampleConfigFiles": [],
|
|
201
232
|
"exampleTools": [
|
|
202
233
|
"gofmt",
|
|
@@ -238,6 +269,12 @@
|
|
|
238
269
|
"id": "type-checking",
|
|
239
270
|
"label": "Type Checking",
|
|
240
271
|
"stack": {
|
|
272
|
+
"bazelHints": {
|
|
273
|
+
"commands": [
|
|
274
|
+
"bazel build //..."
|
|
275
|
+
],
|
|
276
|
+
"notes": "Go type checking is inherent to compilation. bazel build with rules_go enforces type safety."
|
|
277
|
+
},
|
|
241
278
|
"exampleConfigFiles": [
|
|
242
279
|
"go.mod"
|
|
243
280
|
],
|
|
@@ -515,6 +552,43 @@
|
|
|
515
552
|
"azure-devops"
|
|
516
553
|
],
|
|
517
554
|
"meta": {
|
|
555
|
+
"bazelIntegration": {
|
|
556
|
+
"advisoryNotice": "bazelHints are suggestions, not required execution paths. Consumers should prefer stack-native commands unless explicitly adopting Bazel.",
|
|
557
|
+
"ciContract": {
|
|
558
|
+
"configFlag": "--config=ci (define in .bazelrc)",
|
|
559
|
+
"deterministicFlags": [
|
|
560
|
+
"--nokeep_going",
|
|
561
|
+
"--test_output=errors"
|
|
562
|
+
],
|
|
563
|
+
"remoteCache": "Optional; not required for CI",
|
|
564
|
+
"versionPinning": "Use .bazelversion file for Bazelisk"
|
|
565
|
+
},
|
|
566
|
+
"description": "Bazel build executor support for quality checks. All hints are ADVISORY—stack-native commands remain the default execution path.",
|
|
567
|
+
"detectionRules": {
|
|
568
|
+
"notes": "Detection uses repo-root markers only. Nested BUILD files do not trigger Bazel mode.",
|
|
569
|
+
"optionalMarkers": [
|
|
570
|
+
".bazelrc",
|
|
571
|
+
".bazelversion"
|
|
572
|
+
],
|
|
573
|
+
"rootMarkers": [
|
|
574
|
+
"MODULE.bazel",
|
|
575
|
+
"WORKSPACE.bazel",
|
|
576
|
+
"WORKSPACE"
|
|
577
|
+
]
|
|
578
|
+
},
|
|
579
|
+
"optOut": {
|
|
580
|
+
"configPath": "meta.bazelIntegration.enabled",
|
|
581
|
+
"description": "Set meta.bazelIntegration.enabled = false in repo config to disable Bazel hints"
|
|
582
|
+
},
|
|
583
|
+
"targetConventions": {
|
|
584
|
+
"build": "bazel build //...",
|
|
585
|
+
"coverage": "bazel coverage //...",
|
|
586
|
+
"description": "Recommended target naming (not assumed to exist). These are illustrative patterns; actual targets are repo-defined.",
|
|
587
|
+
"format": "bazel run //tools/format:check",
|
|
588
|
+
"lint": "//tools/lint:lint or bazel test //... with lint aspects",
|
|
589
|
+
"test": "bazel test //..."
|
|
590
|
+
}
|
|
591
|
+
},
|
|
518
592
|
"complexityChecks": {
|
|
519
593
|
"description": "When supported by the stack, run cyclomatic complexity or similar metrics in CI as a warning-only check initially.",
|
|
520
594
|
"enabledByDefault": true
|