@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,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
|
"github-actions"
|
|
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
|
|
@@ -41,6 +41,12 @@
|
|
|
41
41
|
"id": "linting",
|
|
42
42
|
"label": "Linting",
|
|
43
43
|
"stack": {
|
|
44
|
+
"bazelHints": {
|
|
45
|
+
"commands": [
|
|
46
|
+
"bazel test //... --@io_bazel_rules_go//go/config:nogo=@//:nogo"
|
|
47
|
+
],
|
|
48
|
+
"notes": "Use nogo for static analysis via rules_go. Configure nogo target with desired analyzers."
|
|
49
|
+
},
|
|
44
50
|
"exampleConfigFiles": [
|
|
45
51
|
".golangci.yml",
|
|
46
52
|
".golangci.yaml"
|
|
@@ -73,6 +79,12 @@
|
|
|
73
79
|
"id": "unit-test-runner",
|
|
74
80
|
"label": "Unit Test Runner",
|
|
75
81
|
"stack": {
|
|
82
|
+
"bazelHints": {
|
|
83
|
+
"commands": [
|
|
84
|
+
"bazel test //..."
|
|
85
|
+
],
|
|
86
|
+
"notes": "rules_go go_test targets wrap 'go test' with Bazel's caching and hermeticity."
|
|
87
|
+
},
|
|
76
88
|
"exampleConfigFiles": [
|
|
77
89
|
"go.mod"
|
|
78
90
|
],
|
|
@@ -178,6 +190,12 @@
|
|
|
178
190
|
"id": "unit-test-reporter",
|
|
179
191
|
"label": "Unit Test Reporter / Coverage",
|
|
180
192
|
"stack": {
|
|
193
|
+
"bazelHints": {
|
|
194
|
+
"commands": [
|
|
195
|
+
"bazel coverage //..."
|
|
196
|
+
],
|
|
197
|
+
"notes": "rules_go supports coverage via bazel coverage. Use --combined_report=lcov for aggregated output."
|
|
198
|
+
},
|
|
181
199
|
"exampleConfigFiles": [
|
|
182
200
|
"go.mod"
|
|
183
201
|
],
|
|
@@ -202,6 +220,13 @@
|
|
|
202
220
|
"id": "ci-quality-gates",
|
|
203
221
|
"label": "CI Quality Gates",
|
|
204
222
|
"stack": {
|
|
223
|
+
"bazelHints": {
|
|
224
|
+
"commands": [
|
|
225
|
+
"bazel build //...",
|
|
226
|
+
"bazel test //..."
|
|
227
|
+
],
|
|
228
|
+
"notes": "rules_go go_binary and go_test targets provide hermetic builds and tests."
|
|
229
|
+
},
|
|
205
230
|
"exampleConfigFiles": [
|
|
206
231
|
".github/workflows/*",
|
|
207
232
|
"azure-pipelines.yml"
|
|
@@ -224,6 +249,12 @@
|
|
|
224
249
|
"id": "code-formatter",
|
|
225
250
|
"label": "Code Formatter",
|
|
226
251
|
"stack": {
|
|
252
|
+
"bazelHints": {
|
|
253
|
+
"commands": [
|
|
254
|
+
"bazel run @go_sdk//:bin/gofmt -- -d ."
|
|
255
|
+
],
|
|
256
|
+
"notes": "Run gofmt via the Bazel-managed Go SDK for hermetic formatting checks."
|
|
257
|
+
},
|
|
227
258
|
"exampleConfigFiles": [],
|
|
228
259
|
"exampleTools": [
|
|
229
260
|
"gofmt",
|
|
@@ -271,6 +302,12 @@
|
|
|
271
302
|
"id": "type-checking",
|
|
272
303
|
"label": "Type Checking",
|
|
273
304
|
"stack": {
|
|
305
|
+
"bazelHints": {
|
|
306
|
+
"commands": [
|
|
307
|
+
"bazel build //..."
|
|
308
|
+
],
|
|
309
|
+
"notes": "Go type checking is inherent to compilation. bazel build with rules_go enforces type safety."
|
|
310
|
+
},
|
|
274
311
|
"exampleConfigFiles": [
|
|
275
312
|
"go.mod"
|
|
276
313
|
],
|
|
@@ -584,6 +621,43 @@
|
|
|
584
621
|
"github-actions"
|
|
585
622
|
],
|
|
586
623
|
"meta": {
|
|
624
|
+
"bazelIntegration": {
|
|
625
|
+
"advisoryNotice": "bazelHints are suggestions, not required execution paths. Consumers should prefer stack-native commands unless explicitly adopting Bazel.",
|
|
626
|
+
"ciContract": {
|
|
627
|
+
"configFlag": "--config=ci (define in .bazelrc)",
|
|
628
|
+
"deterministicFlags": [
|
|
629
|
+
"--nokeep_going",
|
|
630
|
+
"--test_output=errors"
|
|
631
|
+
],
|
|
632
|
+
"remoteCache": "Optional; not required for CI",
|
|
633
|
+
"versionPinning": "Use .bazelversion file for Bazelisk"
|
|
634
|
+
},
|
|
635
|
+
"description": "Bazel build executor support for quality checks. All hints are ADVISORY—stack-native commands remain the default execution path.",
|
|
636
|
+
"detectionRules": {
|
|
637
|
+
"notes": "Detection uses repo-root markers only. Nested BUILD files do not trigger Bazel mode.",
|
|
638
|
+
"optionalMarkers": [
|
|
639
|
+
".bazelrc",
|
|
640
|
+
".bazelversion"
|
|
641
|
+
],
|
|
642
|
+
"rootMarkers": [
|
|
643
|
+
"MODULE.bazel",
|
|
644
|
+
"WORKSPACE.bazel",
|
|
645
|
+
"WORKSPACE"
|
|
646
|
+
]
|
|
647
|
+
},
|
|
648
|
+
"optOut": {
|
|
649
|
+
"configPath": "meta.bazelIntegration.enabled",
|
|
650
|
+
"description": "Set meta.bazelIntegration.enabled = false in repo config to disable Bazel hints"
|
|
651
|
+
},
|
|
652
|
+
"targetConventions": {
|
|
653
|
+
"build": "bazel build //...",
|
|
654
|
+
"coverage": "bazel coverage //...",
|
|
655
|
+
"description": "Recommended target naming (not assumed to exist). These are illustrative patterns; actual targets are repo-defined.",
|
|
656
|
+
"format": "bazel run //tools/format:check",
|
|
657
|
+
"lint": "//tools/lint:lint or bazel test //... with lint aspects",
|
|
658
|
+
"test": "bazel test //..."
|
|
659
|
+
}
|
|
660
|
+
},
|
|
587
661
|
"complexityChecks": {
|
|
588
662
|
"description": "When supported by the stack, run cyclomatic complexity or similar metrics in CI as a warning-only check initially.",
|
|
589
663
|
"enabledByDefault": true
|