@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
|
@@ -35,26 +35,31 @@
|
|
|
35
35
|
"id": "linting",
|
|
36
36
|
"label": "Linting",
|
|
37
37
|
"stack": {
|
|
38
|
+
"anyOfFiles": [
|
|
39
|
+
"pyproject.toml",
|
|
40
|
+
"ruff.toml",
|
|
41
|
+
".flake8",
|
|
42
|
+
"setup.cfg",
|
|
43
|
+
"tox.ini"
|
|
44
|
+
],
|
|
45
|
+
"bazelHints": {
|
|
46
|
+
"commands": [
|
|
47
|
+
"bazel test //...:ruff_test",
|
|
48
|
+
"bazel run //tools/lint:ruff -- check ."
|
|
49
|
+
],
|
|
50
|
+
"notes": "Example only; actual targets are repo-defined. Use rules_python with ruff wrapped as py_test or run target."
|
|
51
|
+
},
|
|
38
52
|
"exampleConfigFiles": [
|
|
39
53
|
"pyproject.toml",
|
|
40
|
-
".flake8"
|
|
54
|
+
".flake8",
|
|
55
|
+
"ruff.toml"
|
|
41
56
|
],
|
|
42
57
|
"exampleTools": [
|
|
43
58
|
"ruff",
|
|
44
59
|
"flake8"
|
|
45
60
|
],
|
|
46
61
|
"notes": "Configure a primary linter (such as ruff) and keep rules focused on catching real issues without overwhelming developers.",
|
|
47
|
-
"
|
|
48
|
-
"ruff.toml",
|
|
49
|
-
".flake8"
|
|
50
|
-
],
|
|
51
|
-
"requiredFiles": [
|
|
52
|
-
"pyproject.toml"
|
|
53
|
-
],
|
|
54
|
-
"requiredScripts": [
|
|
55
|
-
"lint"
|
|
56
|
-
],
|
|
57
|
-
"verification": "pyproject.toml (or ruff.toml / .flake8) signals that linting tools are configured for the repository."
|
|
62
|
+
"verification": "pyproject.toml (or ruff.toml / .flake8 / setup.cfg) signals that linting tools are configured for the repository."
|
|
58
63
|
}
|
|
59
64
|
},
|
|
60
65
|
{
|
|
@@ -67,6 +72,12 @@
|
|
|
67
72
|
"id": "unit-test-runner",
|
|
68
73
|
"label": "Unit Test Runner",
|
|
69
74
|
"stack": {
|
|
75
|
+
"bazelHints": {
|
|
76
|
+
"commands": [
|
|
77
|
+
"bazel test //..."
|
|
78
|
+
],
|
|
79
|
+
"notes": "Example only; actual targets are repo-defined. Use rules_python py_test for pytest-based tests."
|
|
80
|
+
},
|
|
70
81
|
"exampleConfigFiles": [
|
|
71
82
|
"pytest.ini",
|
|
72
83
|
"pyproject.toml"
|
|
@@ -80,9 +91,6 @@
|
|
|
80
91
|
"pyproject.toml",
|
|
81
92
|
"tests/"
|
|
82
93
|
],
|
|
83
|
-
"requiredScripts": [
|
|
84
|
-
"test"
|
|
85
|
-
],
|
|
86
94
|
"verification": "Test framework configuration is present; tests/ directory or pytest configuration exists."
|
|
87
95
|
}
|
|
88
96
|
},
|
|
@@ -166,6 +174,12 @@
|
|
|
166
174
|
"id": "unit-test-reporter",
|
|
167
175
|
"label": "Unit Test Reporter / Coverage",
|
|
168
176
|
"stack": {
|
|
177
|
+
"bazelHints": {
|
|
178
|
+
"commands": [
|
|
179
|
+
"bazel coverage //..."
|
|
180
|
+
],
|
|
181
|
+
"notes": "Use rules_python py_test with coverage instrumentation. Combine with --combined_report=lcov."
|
|
182
|
+
},
|
|
169
183
|
"exampleConfigFiles": [
|
|
170
184
|
"pytest.ini",
|
|
171
185
|
"pyproject.toml"
|
|
@@ -189,6 +203,13 @@
|
|
|
189
203
|
"id": "ci-quality-gates",
|
|
190
204
|
"label": "CI Quality Gates",
|
|
191
205
|
"stack": {
|
|
206
|
+
"bazelHints": {
|
|
207
|
+
"commands": [
|
|
208
|
+
"bazel build //...",
|
|
209
|
+
"bazel test //..."
|
|
210
|
+
],
|
|
211
|
+
"notes": "Bazel py_binary and py_test targets replace traditional Python tooling."
|
|
212
|
+
},
|
|
192
213
|
"exampleConfigFiles": [
|
|
193
214
|
".github/workflows/*",
|
|
194
215
|
"azure-pipelines.yml"
|
|
@@ -208,6 +229,12 @@
|
|
|
208
229
|
"id": "code-formatter",
|
|
209
230
|
"label": "Code Formatter",
|
|
210
231
|
"stack": {
|
|
232
|
+
"bazelHints": {
|
|
233
|
+
"commands": [
|
|
234
|
+
"bazel run //tools/format:black -- --check ."
|
|
235
|
+
],
|
|
236
|
+
"notes": "Wrap black as a py_binary run target for format checking."
|
|
237
|
+
},
|
|
211
238
|
"exampleConfigFiles": [
|
|
212
239
|
"pyproject.toml"
|
|
213
240
|
],
|
|
@@ -248,6 +275,13 @@
|
|
|
248
275
|
"id": "type-checking",
|
|
249
276
|
"label": "Type Checking",
|
|
250
277
|
"stack": {
|
|
278
|
+
"bazelHints": {
|
|
279
|
+
"commands": [
|
|
280
|
+
"bazel test //...:mypy_test",
|
|
281
|
+
"bazel run //tools/typecheck:mypy"
|
|
282
|
+
],
|
|
283
|
+
"notes": "Example only; actual targets are repo-defined. Wrap mypy as a py_test or run target."
|
|
284
|
+
},
|
|
251
285
|
"exampleConfigFiles": [
|
|
252
286
|
"mypy.ini",
|
|
253
287
|
"pyproject.toml"
|
|
@@ -262,9 +296,6 @@
|
|
|
262
296
|
"requiredFiles": [
|
|
263
297
|
"pyproject.toml"
|
|
264
298
|
],
|
|
265
|
-
"requiredScripts": [
|
|
266
|
-
"typecheck"
|
|
267
|
-
],
|
|
268
299
|
"verification": "pyproject.toml (or mypy.ini) signals that mypy configuration is available for the repository."
|
|
269
300
|
}
|
|
270
301
|
},
|
|
@@ -546,6 +577,43 @@
|
|
|
546
577
|
"github-actions"
|
|
547
578
|
],
|
|
548
579
|
"meta": {
|
|
580
|
+
"bazelIntegration": {
|
|
581
|
+
"advisoryNotice": "bazelHints are suggestions, not required execution paths. Consumers should prefer stack-native commands unless explicitly adopting Bazel.",
|
|
582
|
+
"ciContract": {
|
|
583
|
+
"configFlag": "--config=ci (define in .bazelrc)",
|
|
584
|
+
"deterministicFlags": [
|
|
585
|
+
"--nokeep_going",
|
|
586
|
+
"--test_output=errors"
|
|
587
|
+
],
|
|
588
|
+
"remoteCache": "Optional; not required for CI",
|
|
589
|
+
"versionPinning": "Use .bazelversion file for Bazelisk"
|
|
590
|
+
},
|
|
591
|
+
"description": "Bazel build executor support for quality checks. All hints are ADVISORY—stack-native commands remain the default execution path.",
|
|
592
|
+
"detectionRules": {
|
|
593
|
+
"notes": "Detection uses repo-root markers only. Nested BUILD files do not trigger Bazel mode.",
|
|
594
|
+
"optionalMarkers": [
|
|
595
|
+
".bazelrc",
|
|
596
|
+
".bazelversion"
|
|
597
|
+
],
|
|
598
|
+
"rootMarkers": [
|
|
599
|
+
"MODULE.bazel",
|
|
600
|
+
"WORKSPACE.bazel",
|
|
601
|
+
"WORKSPACE"
|
|
602
|
+
]
|
|
603
|
+
},
|
|
604
|
+
"optOut": {
|
|
605
|
+
"configPath": "meta.bazelIntegration.enabled",
|
|
606
|
+
"description": "Set meta.bazelIntegration.enabled = false in repo config to disable Bazel hints"
|
|
607
|
+
},
|
|
608
|
+
"targetConventions": {
|
|
609
|
+
"build": "bazel build //...",
|
|
610
|
+
"coverage": "bazel coverage //...",
|
|
611
|
+
"description": "Recommended target naming (not assumed to exist). These are illustrative patterns; actual targets are repo-defined.",
|
|
612
|
+
"format": "bazel run //tools/format:check",
|
|
613
|
+
"lint": "//tools/lint:lint or bazel test //... with lint aspects",
|
|
614
|
+
"test": "bazel test //..."
|
|
615
|
+
}
|
|
616
|
+
},
|
|
549
617
|
"complexityChecks": {
|
|
550
618
|
"description": "When supported by the stack, run cyclomatic complexity or similar metrics in CI as a warning-only check initially.",
|
|
551
619
|
"enabledByDefault": true
|
|
@@ -41,26 +41,31 @@
|
|
|
41
41
|
"id": "linting",
|
|
42
42
|
"label": "Linting",
|
|
43
43
|
"stack": {
|
|
44
|
+
"anyOfFiles": [
|
|
45
|
+
"pyproject.toml",
|
|
46
|
+
"ruff.toml",
|
|
47
|
+
".flake8",
|
|
48
|
+
"setup.cfg",
|
|
49
|
+
"tox.ini"
|
|
50
|
+
],
|
|
51
|
+
"bazelHints": {
|
|
52
|
+
"commands": [
|
|
53
|
+
"bazel test //...:ruff_test",
|
|
54
|
+
"bazel run //tools/lint:ruff -- check ."
|
|
55
|
+
],
|
|
56
|
+
"notes": "Example only; actual targets are repo-defined. Use rules_python with ruff wrapped as py_test or run target."
|
|
57
|
+
},
|
|
44
58
|
"exampleConfigFiles": [
|
|
45
59
|
"pyproject.toml",
|
|
46
|
-
".flake8"
|
|
60
|
+
".flake8",
|
|
61
|
+
"ruff.toml"
|
|
47
62
|
],
|
|
48
63
|
"exampleTools": [
|
|
49
64
|
"ruff",
|
|
50
65
|
"flake8"
|
|
51
66
|
],
|
|
52
67
|
"notes": "Configure a primary linter (such as ruff) and keep rules focused on catching real issues without overwhelming developers.",
|
|
53
|
-
"
|
|
54
|
-
"ruff.toml",
|
|
55
|
-
".flake8"
|
|
56
|
-
],
|
|
57
|
-
"requiredFiles": [
|
|
58
|
-
"pyproject.toml"
|
|
59
|
-
],
|
|
60
|
-
"requiredScripts": [
|
|
61
|
-
"lint"
|
|
62
|
-
],
|
|
63
|
-
"verification": "pyproject.toml (or ruff.toml / .flake8) signals that linting tools are configured for the repository."
|
|
68
|
+
"verification": "pyproject.toml (or ruff.toml / .flake8 / setup.cfg) signals that linting tools are configured for the repository."
|
|
64
69
|
}
|
|
65
70
|
},
|
|
66
71
|
{
|
|
@@ -76,6 +81,12 @@
|
|
|
76
81
|
"id": "unit-test-runner",
|
|
77
82
|
"label": "Unit Test Runner",
|
|
78
83
|
"stack": {
|
|
84
|
+
"bazelHints": {
|
|
85
|
+
"commands": [
|
|
86
|
+
"bazel test //..."
|
|
87
|
+
],
|
|
88
|
+
"notes": "Example only; actual targets are repo-defined. Use rules_python py_test for pytest-based tests."
|
|
89
|
+
},
|
|
79
90
|
"exampleConfigFiles": [
|
|
80
91
|
"pytest.ini",
|
|
81
92
|
"pyproject.toml"
|
|
@@ -89,9 +100,6 @@
|
|
|
89
100
|
"pyproject.toml",
|
|
90
101
|
"tests/"
|
|
91
102
|
],
|
|
92
|
-
"requiredScripts": [
|
|
93
|
-
"test"
|
|
94
|
-
],
|
|
95
103
|
"verification": "Test framework configuration is present; tests/ directory or pytest configuration exists."
|
|
96
104
|
}
|
|
97
105
|
},
|
|
@@ -187,6 +195,12 @@
|
|
|
187
195
|
"id": "unit-test-reporter",
|
|
188
196
|
"label": "Unit Test Reporter / Coverage",
|
|
189
197
|
"stack": {
|
|
198
|
+
"bazelHints": {
|
|
199
|
+
"commands": [
|
|
200
|
+
"bazel coverage //..."
|
|
201
|
+
],
|
|
202
|
+
"notes": "Use rules_python py_test with coverage instrumentation. Combine with --combined_report=lcov."
|
|
203
|
+
},
|
|
190
204
|
"exampleConfigFiles": [
|
|
191
205
|
"pytest.ini",
|
|
192
206
|
"pyproject.toml"
|
|
@@ -213,6 +227,13 @@
|
|
|
213
227
|
"id": "ci-quality-gates",
|
|
214
228
|
"label": "CI Quality Gates",
|
|
215
229
|
"stack": {
|
|
230
|
+
"bazelHints": {
|
|
231
|
+
"commands": [
|
|
232
|
+
"bazel build //...",
|
|
233
|
+
"bazel test //..."
|
|
234
|
+
],
|
|
235
|
+
"notes": "Bazel py_binary and py_test targets replace traditional Python tooling."
|
|
236
|
+
},
|
|
216
237
|
"exampleConfigFiles": [
|
|
217
238
|
".github/workflows/*",
|
|
218
239
|
"azure-pipelines.yml"
|
|
@@ -235,6 +256,12 @@
|
|
|
235
256
|
"id": "code-formatter",
|
|
236
257
|
"label": "Code Formatter",
|
|
237
258
|
"stack": {
|
|
259
|
+
"bazelHints": {
|
|
260
|
+
"commands": [
|
|
261
|
+
"bazel run //tools/format:black -- --check ."
|
|
262
|
+
],
|
|
263
|
+
"notes": "Wrap black as a py_binary run target for format checking."
|
|
264
|
+
},
|
|
238
265
|
"exampleConfigFiles": [
|
|
239
266
|
"pyproject.toml"
|
|
240
267
|
],
|
|
@@ -281,6 +308,13 @@
|
|
|
281
308
|
"id": "type-checking",
|
|
282
309
|
"label": "Type Checking",
|
|
283
310
|
"stack": {
|
|
311
|
+
"bazelHints": {
|
|
312
|
+
"commands": [
|
|
313
|
+
"bazel test //...:mypy_test",
|
|
314
|
+
"bazel run //tools/typecheck:mypy"
|
|
315
|
+
],
|
|
316
|
+
"notes": "Example only; actual targets are repo-defined. Wrap mypy as a py_test or run target."
|
|
317
|
+
},
|
|
284
318
|
"exampleConfigFiles": [
|
|
285
319
|
"mypy.ini",
|
|
286
320
|
"pyproject.toml"
|
|
@@ -295,9 +329,6 @@
|
|
|
295
329
|
"requiredFiles": [
|
|
296
330
|
"pyproject.toml"
|
|
297
331
|
],
|
|
298
|
-
"requiredScripts": [
|
|
299
|
-
"typecheck"
|
|
300
|
-
],
|
|
301
332
|
"verification": "pyproject.toml (or mypy.ini) signals that mypy configuration is available for the repository."
|
|
302
333
|
}
|
|
303
334
|
},
|
|
@@ -615,6 +646,43 @@
|
|
|
615
646
|
"github-actions"
|
|
616
647
|
],
|
|
617
648
|
"meta": {
|
|
649
|
+
"bazelIntegration": {
|
|
650
|
+
"advisoryNotice": "bazelHints are suggestions, not required execution paths. Consumers should prefer stack-native commands unless explicitly adopting Bazel.",
|
|
651
|
+
"ciContract": {
|
|
652
|
+
"configFlag": "--config=ci (define in .bazelrc)",
|
|
653
|
+
"deterministicFlags": [
|
|
654
|
+
"--nokeep_going",
|
|
655
|
+
"--test_output=errors"
|
|
656
|
+
],
|
|
657
|
+
"remoteCache": "Optional; not required for CI",
|
|
658
|
+
"versionPinning": "Use .bazelversion file for Bazelisk"
|
|
659
|
+
},
|
|
660
|
+
"description": "Bazel build executor support for quality checks. All hints are ADVISORY—stack-native commands remain the default execution path.",
|
|
661
|
+
"detectionRules": {
|
|
662
|
+
"notes": "Detection uses repo-root markers only. Nested BUILD files do not trigger Bazel mode.",
|
|
663
|
+
"optionalMarkers": [
|
|
664
|
+
".bazelrc",
|
|
665
|
+
".bazelversion"
|
|
666
|
+
],
|
|
667
|
+
"rootMarkers": [
|
|
668
|
+
"MODULE.bazel",
|
|
669
|
+
"WORKSPACE.bazel",
|
|
670
|
+
"WORKSPACE"
|
|
671
|
+
]
|
|
672
|
+
},
|
|
673
|
+
"optOut": {
|
|
674
|
+
"configPath": "meta.bazelIntegration.enabled",
|
|
675
|
+
"description": "Set meta.bazelIntegration.enabled = false in repo config to disable Bazel hints"
|
|
676
|
+
},
|
|
677
|
+
"targetConventions": {
|
|
678
|
+
"build": "bazel build //...",
|
|
679
|
+
"coverage": "bazel coverage //...",
|
|
680
|
+
"description": "Recommended target naming (not assumed to exist). These are illustrative patterns; actual targets are repo-defined.",
|
|
681
|
+
"format": "bazel run //tools/format:check",
|
|
682
|
+
"lint": "//tools/lint:lint or bazel test //... with lint aspects",
|
|
683
|
+
"test": "bazel test //..."
|
|
684
|
+
}
|
|
685
|
+
},
|
|
618
686
|
"complexityChecks": {
|
|
619
687
|
"description": "When supported by the stack, run cyclomatic complexity or similar metrics in CI as a warning-only check initially.",
|
|
620
688
|
"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_rust//rust:defs.bzl%clippy_aspect --output_groups=clippy_checks"
|
|
41
|
+
],
|
|
42
|
+
"notes": "Example only; actual targets are repo-defined. rules_rust includes clippy_aspect for Bazel-native Clippy linting."
|
|
43
|
+
},
|
|
38
44
|
"exampleConfigFiles": [
|
|
39
45
|
"clippy.toml",
|
|
40
46
|
".clippy.toml"
|
|
@@ -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_rust rust_test targets run cargo test under Bazel's hermetic environment."
|
|
78
|
+
},
|
|
67
79
|
"exampleConfigFiles": [
|
|
68
80
|
"Cargo.toml"
|
|
69
81
|
],
|
|
@@ -159,6 +171,12 @@
|
|
|
159
171
|
"id": "unit-test-reporter",
|
|
160
172
|
"label": "Unit Test Reporter / Coverage",
|
|
161
173
|
"stack": {
|
|
174
|
+
"bazelHints": {
|
|
175
|
+
"commands": [
|
|
176
|
+
"bazel coverage //..."
|
|
177
|
+
],
|
|
178
|
+
"notes": "Bazel coverage with rules_rust requires LLVM instrumentation. May need additional toolchain configuration."
|
|
179
|
+
},
|
|
162
180
|
"exampleConfigFiles": [
|
|
163
181
|
"Cargo.toml"
|
|
164
182
|
],
|
|
@@ -181,6 +199,13 @@
|
|
|
181
199
|
"id": "ci-quality-gates",
|
|
182
200
|
"label": "CI Quality Gates",
|
|
183
201
|
"stack": {
|
|
202
|
+
"bazelHints": {
|
|
203
|
+
"commands": [
|
|
204
|
+
"bazel build //...",
|
|
205
|
+
"bazel test //..."
|
|
206
|
+
],
|
|
207
|
+
"notes": "rules_rust provides rust_library, rust_test, and clippy_aspect for complete CI."
|
|
208
|
+
},
|
|
184
209
|
"exampleConfigFiles": [
|
|
185
210
|
".github/workflows/*",
|
|
186
211
|
"azure-pipelines.yml"
|
|
@@ -200,6 +225,12 @@
|
|
|
200
225
|
"id": "code-formatter",
|
|
201
226
|
"label": "Code Formatter",
|
|
202
227
|
"stack": {
|
|
228
|
+
"bazelHints": {
|
|
229
|
+
"commands": [
|
|
230
|
+
"bazel build //... --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect --output_groups=rustfmt_checks"
|
|
231
|
+
],
|
|
232
|
+
"notes": "rules_rust includes rustfmt_aspect for Bazel-native format checking."
|
|
233
|
+
},
|
|
203
234
|
"exampleConfigFiles": [
|
|
204
235
|
"rustfmt.toml",
|
|
205
236
|
".rustfmt.toml"
|
|
@@ -242,6 +273,12 @@
|
|
|
242
273
|
"id": "type-checking",
|
|
243
274
|
"label": "Type Checking",
|
|
244
275
|
"stack": {
|
|
276
|
+
"bazelHints": {
|
|
277
|
+
"commands": [
|
|
278
|
+
"bazel build //..."
|
|
279
|
+
],
|
|
280
|
+
"notes": "Rust type checking is inherent to compilation. bazel build with rules_rust enforces type safety."
|
|
281
|
+
},
|
|
245
282
|
"exampleConfigFiles": [
|
|
246
283
|
"Cargo.toml"
|
|
247
284
|
],
|
|
@@ -524,6 +561,43 @@
|
|
|
524
561
|
"azure-devops"
|
|
525
562
|
],
|
|
526
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
|
+
},
|
|
527
601
|
"complexityChecks": {
|
|
528
602
|
"description": "When supported by the stack, run cyclomatic complexity or similar metrics in CI as a warning-only check initially.",
|
|
529
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_rust//rust:defs.bzl%clippy_aspect --output_groups=clippy_checks"
|
|
41
|
+
],
|
|
42
|
+
"notes": "Example only; actual targets are repo-defined. rules_rust includes clippy_aspect for Bazel-native Clippy linting."
|
|
43
|
+
},
|
|
38
44
|
"exampleConfigFiles": [
|
|
39
45
|
"clippy.toml",
|
|
40
46
|
".clippy.toml"
|
|
@@ -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_rust rust_test targets run cargo test under Bazel's hermetic environment."
|
|
78
|
+
},
|
|
67
79
|
"exampleConfigFiles": [
|
|
68
80
|
"Cargo.toml"
|
|
69
81
|
],
|
|
@@ -159,6 +171,12 @@
|
|
|
159
171
|
"id": "unit-test-reporter",
|
|
160
172
|
"label": "Unit Test Reporter / Coverage",
|
|
161
173
|
"stack": {
|
|
174
|
+
"bazelHints": {
|
|
175
|
+
"commands": [
|
|
176
|
+
"bazel coverage //..."
|
|
177
|
+
],
|
|
178
|
+
"notes": "Bazel coverage with rules_rust requires LLVM instrumentation. May need additional toolchain configuration."
|
|
179
|
+
},
|
|
162
180
|
"exampleConfigFiles": [
|
|
163
181
|
"Cargo.toml"
|
|
164
182
|
],
|
|
@@ -181,6 +199,13 @@
|
|
|
181
199
|
"id": "ci-quality-gates",
|
|
182
200
|
"label": "CI Quality Gates",
|
|
183
201
|
"stack": {
|
|
202
|
+
"bazelHints": {
|
|
203
|
+
"commands": [
|
|
204
|
+
"bazel build //...",
|
|
205
|
+
"bazel test //..."
|
|
206
|
+
],
|
|
207
|
+
"notes": "rules_rust provides rust_library, rust_test, and clippy_aspect for complete CI."
|
|
208
|
+
},
|
|
184
209
|
"exampleConfigFiles": [
|
|
185
210
|
".github/workflows/*",
|
|
186
211
|
"azure-pipelines.yml"
|
|
@@ -200,6 +225,12 @@
|
|
|
200
225
|
"id": "code-formatter",
|
|
201
226
|
"label": "Code Formatter",
|
|
202
227
|
"stack": {
|
|
228
|
+
"bazelHints": {
|
|
229
|
+
"commands": [
|
|
230
|
+
"bazel build //... --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect --output_groups=rustfmt_checks"
|
|
231
|
+
],
|
|
232
|
+
"notes": "rules_rust includes rustfmt_aspect for Bazel-native format checking."
|
|
233
|
+
},
|
|
203
234
|
"exampleConfigFiles": [
|
|
204
235
|
"rustfmt.toml",
|
|
205
236
|
".rustfmt.toml"
|
|
@@ -242,6 +273,12 @@
|
|
|
242
273
|
"id": "type-checking",
|
|
243
274
|
"label": "Type Checking",
|
|
244
275
|
"stack": {
|
|
276
|
+
"bazelHints": {
|
|
277
|
+
"commands": [
|
|
278
|
+
"bazel build //..."
|
|
279
|
+
],
|
|
280
|
+
"notes": "Rust type checking is inherent to compilation. bazel build with rules_rust enforces type safety."
|
|
281
|
+
},
|
|
245
282
|
"exampleConfigFiles": [
|
|
246
283
|
"Cargo.toml"
|
|
247
284
|
],
|
|
@@ -524,6 +561,43 @@
|
|
|
524
561
|
"github-actions"
|
|
525
562
|
],
|
|
526
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
|
+
},
|
|
527
601
|
"complexityChecks": {
|
|
528
602
|
"description": "When supported by the stack, run cyclomatic complexity or similar metrics in CI as a warning-only check initially.",
|
|
529
603
|
"enabledByDefault": true
|