Skip to content

fix: golangci-lint CI drift — pin version, replace reflect.Ptr, exclude ui/node_modules#547

Merged
intel352 merged 7 commits into
mainfrom
copilot/fix-golangci-lint-drift
May 6, 2026
Merged

fix: golangci-lint CI drift — pin version, replace reflect.Ptr, exclude ui/node_modules#547
intel352 merged 7 commits into
mainfrom
copilot/fix-golangci-lint-drift

Conversation

Copilot AI commented May 5, 2026

Copy link
Copy Markdown
Contributor

golangci-lint v2.12.0 (pulled via version: latest) added the govet inline check, flagging the deprecated reflect.Ptr constant in two source files and also scanning vendored Go code in ui/node_modules/ that we don't own (installed at CI time by npm ci).

Changes

  • .github/workflows/ci.yml — Pin both lint and lint-examples jobs from version: latestversion: v2.12.0 to prevent future silent drift
  • module/scan_provider_test.go, schema/reflect.go — Replace deprecated reflect.Ptr with reflect.Pointer (canonical name since Go 1.18)
  • .golangci.yml — Add linters.exclusions.paths: [ui/node_modules] so third-party Go code vendored by npm packages (e.g. esbuild) is excluded from analysis entirely — preventing loading/typechecking, not just suppressing findings
  • cmd/iac-codemod/, cmd/wfctl/, iac/ — Fix 29 lint issues introduced by recently merged main commits: gocritic (commentedOutCode, dupBranchBody, rangeValCopy), gosec (file permissions, G710 open redirect), staticcheck (De Morgan's law, error string format, embedded field selectors), and unused declarations. Forward-compatibility stubs (siblingUsesInterfacesImport, bodyCallsSelector, applyCanonicalCallExpr, planCanonicalCallExpr) are retained with //nolint:unused directives.
// Before — triggers govet inline in v2.12.0
if rv.Kind() != reflect.Ptr || rv.IsNil() { ... }
if t.Kind() == reflect.Ptr { ... }

// After
if rv.Kind() != reflect.Pointer || rv.IsNil() { ... }
if t.Kind() == reflect.Pointer { ... }

Copilot AI requested review from Copilot and removed request for Copilot May 5, 2026 07:50
Copilot AI changed the title [WIP] Fix lint drift issues with golangci-lint version fix: golangci-lint CI drift — pin version, replace reflect.Ptr, exclude ui/node_modules May 5, 2026
Copilot AI requested a review from intel352 May 5, 2026 07:53
@intel352 intel352 marked this pull request as ready for review May 5, 2026 08:01
Copilot AI review requested due to automatic review settings May 5, 2026 08:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Stabilizes Go linting in CI by pinning the golangci-lint version, updating code to avoid a newly-enforced deprecated reflect.Ptr usage, and preventing lint from traversing third-party Go sources under the UI’s node_modules.

Changes:

  • Pin golangci-lint in CI from latest to v2.12.0 to avoid silent CI drift.
  • Replace deprecated reflect.Ptr checks with reflect.Pointer in Go code.
  • Exclude ui/node_modules from golangci-lint’s directory scan to avoid linting vendored third-party Go code.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
.github/workflows/ci.yml Pins golangci-lint version in both lint jobs to prevent future CI drift.
.golangci.yml Excludes ui/node_modules from lint scanning to avoid third-party code analysis.
schema/reflect.go Updates pointer-kind check to use reflect.Pointer to satisfy new govet behavior.
module/scan_provider_test.go Updates pointer-kind check to use reflect.Pointer in test helper code.

@intel352

intel352 commented May 5, 2026

Copy link
Copy Markdown
Contributor

Copilot AI commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

@copilot https://github.com/GoCodeAlone/workflow/actions/runs/25364381123/job/74373007011?pr=547 and https://github.com/GoCodeAlone/workflow/actions/runs/25364381123/job/74373006999?...

Fixed in 938eebf. The run.exclude-dirs key I added isn't a valid property in the golangci-lint v2.12.0 config schema (which caused config verify to fail). Changed to the correct v2 approach: a linters.exclusions.rules entry with path: ui/node_modules + the full list of enabled linters. golangci-lint config verify now passes cleanly.

@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:260: parsing iteration count: invalid syntax
baseline-bench.txt:307377: parsing iteration count: invalid syntax
baseline-bench.txt:642403: parsing iteration count: invalid syntax
baseline-bench.txt:1196420: parsing iteration count: invalid syntax
baseline-bench.txt:1539732: parsing iteration count: invalid syntax
baseline-bench.txt:1864750: parsing iteration count: invalid syntax
benchmark-results.txt:260: parsing iteration count: invalid syntax
benchmark-results.txt:317091: parsing iteration count: invalid syntax
benchmark-results.txt:654898: parsing iteration count: invalid syntax
benchmark-results.txt:976370: parsing iteration count: invalid syntax
benchmark-results.txt:1294404: parsing iteration count: invalid syntax
benchmark-results.txt:1600729: parsing iteration count: invalid syntax
goos: linux
goarch: amd64
pkg: github.com/GoCodeAlone/workflow/dynamic
cpu: AMD EPYC 9V74 80-Core Processor                
                            │ benchmark-results.txt │
                            │        sec/op         │
InterpreterCreation-4                  6.612m ± 69%
ComponentLoad-4                        3.482m ±  1%
ComponentExecute-4                     1.814µ ±  0%
PoolContention/workers-1-4             1.018µ ±  2%
PoolContention/workers-2-4             1.021µ ±  3%
PoolContention/workers-4-4             1.020µ ±  1%
PoolContention/workers-8-4             1.030µ ±  4%
PoolContention/workers-16-4            1.027µ ±  1%
ComponentLifecycle-4                   3.518m ±  1%
SourceValidation-4                     2.093µ ±  0%
RegistryConcurrent-4                   793.1n ±  4%
LoaderLoadFromString-4                 3.553m ±  0%
geomean                                17.74µ

                            │ benchmark-results.txt │
                            │         B/op          │
InterpreterCreation-4                  2.027Mi ± 0%
ComponentLoad-4                        2.180Mi ± 0%
ComponentExecute-4                     1.203Ki ± 0%
PoolContention/workers-1-4             1.203Ki ± 0%
PoolContention/workers-2-4             1.203Ki ± 0%
PoolContention/workers-4-4             1.203Ki ± 0%
PoolContention/workers-8-4             1.203Ki ± 0%
PoolContention/workers-16-4            1.203Ki ± 0%
ComponentLifecycle-4                   2.183Mi ± 0%
SourceValidation-4                     1.984Ki ± 0%
RegistryConcurrent-4                   1.133Ki ± 0%
LoaderLoadFromString-4                 2.182Mi ± 0%
geomean                                15.25Ki

                            │ benchmark-results.txt │
                            │       allocs/op       │
InterpreterCreation-4                   15.68k ± 0%
ComponentLoad-4                         18.02k ± 0%
ComponentExecute-4                       25.00 ± 0%
PoolContention/workers-1-4               25.00 ± 0%
PoolContention/workers-2-4               25.00 ± 0%
PoolContention/workers-4-4               25.00 ± 0%
PoolContention/workers-8-4               25.00 ± 0%
PoolContention/workers-16-4              25.00 ± 0%
ComponentLifecycle-4                    18.07k ± 0%
SourceValidation-4                       32.00 ± 0%
RegistryConcurrent-4                     2.000 ± 0%
LoaderLoadFromString-4                  18.06k ± 0%
geomean                                  183.3

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                            │ baseline-bench.txt │
                            │       sec/op       │
InterpreterCreation-4              3.262m ± 192%
ComponentLoad-4                    3.507m ±   4%
ComponentExecute-4                 1.876µ ±   1%
PoolContention/workers-1-4         1.190µ ±   0%
PoolContention/workers-2-4         1.192µ ±   2%
PoolContention/workers-4-4         1.198µ ±   2%
PoolContention/workers-8-4         1.201µ ±   1%
PoolContention/workers-16-4        1.197µ ±   1%
ComponentLifecycle-4               3.600m ±   3%
SourceValidation-4                 2.240µ ±   1%
RegistryConcurrent-4               898.9n ±   7%
LoaderLoadFromString-4             3.587m ±   3%
geomean                            18.25µ

                            │ baseline-bench.txt │
                            │        B/op        │
InterpreterCreation-4               2.027Mi ± 0%
ComponentLoad-4                     2.180Mi ± 0%
ComponentExecute-4                  1.203Ki ± 0%
PoolContention/workers-1-4          1.203Ki ± 0%
PoolContention/workers-2-4          1.203Ki ± 0%
PoolContention/workers-4-4          1.203Ki ± 0%
PoolContention/workers-8-4          1.203Ki ± 0%
PoolContention/workers-16-4         1.203Ki ± 0%
ComponentLifecycle-4                2.183Mi ± 0%
SourceValidation-4                  1.984Ki ± 0%
RegistryConcurrent-4                1.133Ki ± 0%
LoaderLoadFromString-4              2.182Mi ± 0%
geomean                             15.25Ki

                            │ baseline-bench.txt │
                            │     allocs/op      │
InterpreterCreation-4                15.68k ± 0%
ComponentLoad-4                      18.02k ± 0%
ComponentExecute-4                    25.00 ± 0%
PoolContention/workers-1-4            25.00 ± 0%
PoolContention/workers-2-4            25.00 ± 0%
PoolContention/workers-4-4            25.00 ± 0%
PoolContention/workers-8-4            25.00 ± 0%
PoolContention/workers-16-4           25.00 ± 0%
ComponentLifecycle-4                 18.07k ± 0%
SourceValidation-4                    32.00 ± 0%
RegistryConcurrent-4                  2.000 ± 0%
LoaderLoadFromString-4               18.06k ± 0%
geomean                               183.3

pkg: github.com/GoCodeAlone/workflow/middleware
cpu: AMD EPYC 9V74 80-Core Processor                
                                  │ benchmark-results.txt │
                                  │        sec/op         │
CircuitBreakerDetection-4                     298.5n ± 6%
CircuitBreakerExecution_Success-4             22.69n ± 1%
CircuitBreakerExecution_Failure-4             71.03n ± 1%
geomean                                       78.36n

                                  │ benchmark-results.txt │
                                  │         B/op          │
CircuitBreakerDetection-4                    144.0 ± 0%
CircuitBreakerExecution_Success-4            0.000 ± 0%
CircuitBreakerExecution_Failure-4            0.000 ± 0%
geomean                                                 ¹
¹ summaries must be >0 to compute geomean

                                  │ benchmark-results.txt │
                                  │       allocs/op       │
CircuitBreakerDetection-4                    1.000 ± 0%
CircuitBreakerExecution_Success-4            0.000 ± 0%
CircuitBreakerExecution_Failure-4            0.000 ± 0%
geomean                                                 ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                  │ baseline-bench.txt │
                                  │       sec/op       │
CircuitBreakerDetection-4                  456.5n ± 2%
CircuitBreakerExecution_Success-4          59.68n ± 0%
CircuitBreakerExecution_Failure-4          65.40n ± 0%
geomean                                    121.2n

                                  │ baseline-bench.txt │
                                  │        B/op        │
CircuitBreakerDetection-4                 144.0 ± 0%
CircuitBreakerExecution_Success-4         0.000 ± 0%
CircuitBreakerExecution_Failure-4         0.000 ± 0%
geomean                                              ¹
¹ summaries must be >0 to compute geomean

                                  │ baseline-bench.txt │
                                  │     allocs/op      │
CircuitBreakerDetection-4                 1.000 ± 0%
CircuitBreakerExecution_Success-4         0.000 ± 0%
CircuitBreakerExecution_Failure-4         0.000 ± 0%
geomean                                              ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/module
cpu: AMD EPYC 9V74 80-Core Processor                
                                 │ benchmark-results.txt │
                                 │        sec/op         │
JQTransform_Simple-4                        818.3n ± 30%
JQTransform_ObjectConstruction-4            1.423µ ±  1%
JQTransform_ArraySelect-4                   3.339µ ±  0%
JQTransform_Complex-4                       40.64µ ±  0%
JQTransform_Throughput-4                    1.727µ ±  1%
SSEPublishDelivery-4                        64.47n ±  1%
geomean                                     1.613µ

                                 │ benchmark-results.txt │
                                 │         B/op          │
JQTransform_Simple-4                      1.273Ki ± 0%
JQTransform_ObjectConstruction-4          1.773Ki ± 0%
JQTransform_ArraySelect-4                 2.625Ki ± 0%
JQTransform_Complex-4                     16.22Ki ± 0%
JQTransform_Throughput-4                  1.984Ki ± 0%
SSEPublishDelivery-4                        0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

                                 │ benchmark-results.txt │
                                 │       allocs/op       │
JQTransform_Simple-4                        10.00 ± 0%
JQTransform_ObjectConstruction-4            15.00 ± 0%
JQTransform_ArraySelect-4                   30.00 ± 0%
JQTransform_Complex-4                       324.0 ± 0%
JQTransform_Throughput-4                    17.00 ± 0%
SSEPublishDelivery-4                        0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                 │ baseline-bench.txt │
                                 │       sec/op       │
JQTransform_Simple-4                     976.9n ± 18%
JQTransform_ObjectConstruction-4         1.502µ ±  1%
JQTransform_ArraySelect-4                3.198µ ±  1%
JQTransform_Complex-4                    35.17µ ±  1%
JQTransform_Throughput-4                 1.802µ ±  1%
SSEPublishDelivery-4                     76.63n ±  4%
geomean                                  1.684µ

                                 │ baseline-bench.txt │
                                 │        B/op        │
JQTransform_Simple-4                   1.273Ki ± 0%
JQTransform_ObjectConstruction-4       1.773Ki ± 0%
JQTransform_ArraySelect-4              2.625Ki ± 0%
JQTransform_Complex-4                  16.22Ki ± 0%
JQTransform_Throughput-4               1.984Ki ± 0%
SSEPublishDelivery-4                     0.000 ± 0%
geomean                                             ¹
¹ summaries must be >0 to compute geomean

                                 │ baseline-bench.txt │
                                 │     allocs/op      │
JQTransform_Simple-4                     10.00 ± 0%
JQTransform_ObjectConstruction-4         15.00 ± 0%
JQTransform_ArraySelect-4                30.00 ± 0%
JQTransform_Complex-4                    324.0 ± 0%
JQTransform_Throughput-4                 17.00 ± 0%
SSEPublishDelivery-4                     0.000 ± 0%
geomean                                             ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/schema
cpu: AMD EPYC 9V74 80-Core Processor                
                                    │ benchmark-results.txt │
                                    │        sec/op         │
SchemaValidation_Simple-4                      1.136µ ± 20%
SchemaValidation_AllFields-4                   1.702µ ±  5%
SchemaValidation_FormatValidation-4            1.597µ ±  1%
SchemaValidation_ManySchemas-4                 1.613µ ±  2%
geomean                                        1.494µ

                                    │ benchmark-results.txt │
                                    │         B/op          │
SchemaValidation_Simple-4                      0.000 ± 0%
SchemaValidation_AllFields-4                   0.000 ± 0%
SchemaValidation_FormatValidation-4            0.000 ± 0%
SchemaValidation_ManySchemas-4                 0.000 ± 0%
geomean                                                   ¹
¹ summaries must be >0 to compute geomean

                                    │ benchmark-results.txt │
                                    │       allocs/op       │
SchemaValidation_Simple-4                      0.000 ± 0%
SchemaValidation_AllFields-4                   0.000 ± 0%
SchemaValidation_FormatValidation-4            0.000 ± 0%
SchemaValidation_ManySchemas-4                 0.000 ± 0%
geomean                                                   ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                    │ baseline-bench.txt │
                                    │       sec/op       │
SchemaValidation_Simple-4                   1.010µ ±  6%
SchemaValidation_AllFields-4                1.492µ ± 32%
SchemaValidation_FormatValidation-4         1.453µ ±  1%
SchemaValidation_ManySchemas-4              1.500µ ±  4%
geomean                                     1.346µ

                                    │ baseline-bench.txt │
                                    │        B/op        │
SchemaValidation_Simple-4                   0.000 ± 0%
SchemaValidation_AllFields-4                0.000 ± 0%
SchemaValidation_FormatValidation-4         0.000 ± 0%
SchemaValidation_ManySchemas-4              0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

                                    │ baseline-bench.txt │
                                    │     allocs/op      │
SchemaValidation_Simple-4                   0.000 ± 0%
SchemaValidation_AllFields-4                0.000 ± 0%
SchemaValidation_FormatValidation-4         0.000 ± 0%
SchemaValidation_ManySchemas-4              0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/store
cpu: AMD EPYC 9V74 80-Core Processor                
                                   │ benchmark-results.txt │
                                   │        sec/op         │
EventStoreAppend_InMemory-4                   1.081µ ± 24%
EventStoreAppend_SQLite-4                     960.6µ ±  2%
GetTimeline_InMemory/events-10-4              13.26µ ±  3%
GetTimeline_InMemory/events-50-4              74.44µ ± 21%
GetTimeline_InMemory/events-100-4             117.8µ ±  1%
GetTimeline_InMemory/events-500-4             605.7µ ±  1%
GetTimeline_InMemory/events-1000-4            1.219m ±  2%
GetTimeline_SQLite/events-10-4                98.76µ ±  1%
GetTimeline_SQLite/events-50-4                247.6µ ±  1%
GetTimeline_SQLite/events-100-4               414.1µ ±  1%
GetTimeline_SQLite/events-500-4               1.789m ±  1%
GetTimeline_SQLite/events-1000-4              3.496m ±  1%
geomean                                       205.4µ

                                   │ benchmark-results.txt │
                                   │         B/op          │
EventStoreAppend_InMemory-4                     745.0 ± 4%
EventStoreAppend_SQLite-4                     1.984Ki ± 1%
GetTimeline_InMemory/events-10-4              7.953Ki ± 0%
GetTimeline_InMemory/events-50-4              46.62Ki ± 0%
GetTimeline_InMemory/events-100-4             94.48Ki ± 0%
GetTimeline_InMemory/events-500-4             472.8Ki ± 0%
GetTimeline_InMemory/events-1000-4            944.3Ki ± 0%
GetTimeline_SQLite/events-10-4                16.74Ki ± 0%
GetTimeline_SQLite/events-50-4                87.14Ki ± 0%
GetTimeline_SQLite/events-100-4               175.4Ki ± 0%
GetTimeline_SQLite/events-500-4               846.1Ki ± 0%
GetTimeline_SQLite/events-1000-4              1.639Mi ± 0%
geomean                                       67.02Ki

                                   │ benchmark-results.txt │
                                   │       allocs/op       │
EventStoreAppend_InMemory-4                     7.000 ± 0%
EventStoreAppend_SQLite-4                       53.00 ± 0%
GetTimeline_InMemory/events-10-4                125.0 ± 0%
GetTimeline_InMemory/events-50-4                653.0 ± 0%
GetTimeline_InMemory/events-100-4              1.306k ± 0%
GetTimeline_InMemory/events-500-4              6.514k ± 0%
GetTimeline_InMemory/events-1000-4             13.02k ± 0%
GetTimeline_SQLite/events-10-4                  382.0 ± 0%
GetTimeline_SQLite/events-50-4                 1.852k ± 0%
GetTimeline_SQLite/events-100-4                3.681k ± 0%
GetTimeline_SQLite/events-500-4                18.54k ± 0%
GetTimeline_SQLite/events-1000-4               37.29k ± 0%
geomean                                        1.162k

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                   │ baseline-bench.txt │
                                   │       sec/op       │
EventStoreAppend_InMemory-4                1.181µ ± 23%
EventStoreAppend_SQLite-4                  979.5µ ±  6%
GetTimeline_InMemory/events-10-4           13.72µ ±  1%
GetTimeline_InMemory/events-50-4           77.31µ ±  3%
GetTimeline_InMemory/events-100-4          151.7µ ±  3%
GetTimeline_InMemory/events-500-4          600.9µ ±  0%
GetTimeline_InMemory/events-1000-4         1.220m ±  1%
GetTimeline_SQLite/events-10-4             89.01µ ±  1%
GetTimeline_SQLite/events-50-4             244.5µ ±  3%
GetTimeline_SQLite/events-100-4            433.1µ ±  3%
GetTimeline_SQLite/events-500-4            1.955m ±  2%
GetTimeline_SQLite/events-1000-4           3.802m ±  2%
geomean                                    214.6µ

                                   │ baseline-bench.txt │
                                   │        B/op        │
EventStoreAppend_InMemory-4                  807.0 ± 3%
EventStoreAppend_SQLite-4                  1.984Ki ± 2%
GetTimeline_InMemory/events-10-4           7.953Ki ± 0%
GetTimeline_InMemory/events-50-4           46.62Ki ± 0%
GetTimeline_InMemory/events-100-4          94.48Ki ± 0%
GetTimeline_InMemory/events-500-4          472.8Ki ± 0%
GetTimeline_InMemory/events-1000-4         944.3Ki ± 0%
GetTimeline_SQLite/events-10-4             16.74Ki ± 0%
GetTimeline_SQLite/events-50-4             87.14Ki ± 0%
GetTimeline_SQLite/events-100-4            175.4Ki ± 0%
GetTimeline_SQLite/events-500-4            846.1Ki ± 0%
GetTimeline_SQLite/events-1000-4           1.639Mi ± 0%
geomean                                    67.46Ki

                                   │ baseline-bench.txt │
                                   │     allocs/op      │
EventStoreAppend_InMemory-4                  7.000 ± 0%
EventStoreAppend_SQLite-4                    53.00 ± 0%
GetTimeline_InMemory/events-10-4             125.0 ± 0%
GetTimeline_InMemory/events-50-4             653.0 ± 0%
GetTimeline_InMemory/events-100-4           1.306k ± 0%
GetTimeline_InMemory/events-500-4           6.514k ± 0%
GetTimeline_InMemory/events-1000-4          13.02k ± 0%
GetTimeline_SQLite/events-10-4               382.0 ± 0%
GetTimeline_SQLite/events-50-4              1.852k ± 0%
GetTimeline_SQLite/events-100-4             3.681k ± 0%
GetTimeline_SQLite/events-500-4             18.54k ± 0%
GetTimeline_SQLite/events-1000-4            37.29k ± 0%
geomean                                     1.162k

Benchmarks run with go test -bench=. -benchmem -count=6.
Regressions ≥ 20% are flagged. Results compared via benchstat.

Copilot AI review requested due to automatic review settings May 5, 2026 13:39
@intel352

intel352 commented May 5, 2026

Copy link
Copy Markdown
Contributor

@copilot https://github.com/GoCodeAlone/workflow/actions/runs/25365727568/job/74375958242?pr=547 still failing, make sure you're able to run the linter and it passes without any remaining issues.

Also, ui/node_modules, seems this shouldn't be committed? And why would we have golang sources under ui/node_modules? That's supposed to have nodejs sources, not golang sources.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread .golangci.yml Outdated

Copilot AI commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

@copilot https://github.com/GoCodeAlone/workflow/actions/runs/25365727568/job/74375958242?pr=547 still failing, make sure you're able to run the linter and it passes without any rema...

Fixed in 93a7f96. Two separate issues addressed:

1. Remaining lint failures (29 issues): The new CI run revealed that the recently merged main commits (#548, #556, #557) introduced lint issues (gocritic: commentedOutCode/dupBranchBody/rangeValCopy; gosec: file permissions, G710 open redirect; staticcheck: De Morgan's law, error string format, embedded field selectors; unused functions/constants). All 29 are now fixed.

2. ui/node_modules: This directory is gitignored and not committed. The exclusion rule in .golangci.yml is needed for CI, where npm ci installs packages before the lint step runs — some npm packages (like esbuild) ship Go source files in their distributions, which golangci-lint would otherwise scan. The exclusion is purely a CI lint-scope guard.

@intel352

intel352 commented May 5, 2026

Copy link
Copy Markdown
Contributor

@copilot apply changes based on the comments in this thread

Also fix merge conflicts.

Also, why were multiple functions deleted in this commit? 93a7f96
If they were unused, that would make sense I guess, but it seems they had been intended to exist for a reason

…eted functions with nolint

Agent-Logs-Url: https://github.com/GoCodeAlone/workflow/sessions/001a144d-80dd-4e02-8eb1-62770ed05dde

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 5, 2026 14:32

Copilot AI commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

@copilot apply changes based on the comments in this thread

Also fix merge conflicts.
...

Fixed in 317d2bd:

.golangci.yml: Switched from linters.exclusions.rules (which still loads/typechecks packages) to linters.exclusions.paths — the correct v2 run-level approach that prevents packages under ui/node_modules from being analyzed entirely.

Restored functions/constants: Brought back siblingUsesInterfacesImport, bodyCallsSelector, applyCanonicalCallExpr, and planCanonicalCallExpr with //nolint:unused directives. These were deleted to silence the unused linter but clearly intended to remain as forward-compatibility hooks — suppressing the lint finding is the right approach here.

@intel352

intel352 commented May 6, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

… stubs)

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 6, 2026 04:48

Copilot AI commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Resolved in e83cd85. Merged origin/main, resolving all 6 conflicted files:

  • .golangci.yml: kept linters.exclusions.paths (our correct run-level approach); discarded main's rules entry
  • cmd/iac-codemod/*.go: kept restored stubs (siblingUsesInterfacesImport, bodyCallsSelector, applyCanonicalCallExpr, planCanonicalCallExpr); integrated main's clarifying comments (reworded to avoid commentedOutCode gocritic false positives)
  • cmd/wfctl/infra_bootstrap.go: took main's improved comment text
  • Fixed 3 new lint issues introduced by the merge (commentedOutCode ×2, unused ×1)

@intel352 intel352 merged commit c78b872 into main May 6, 2026
20 checks passed
@intel352 intel352 deleted the copilot/fix-golangci-lint-drift branch May 6, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI lint drift: golangci-lint version: latest pulled v2.12.0; reflect.Ptr govet inline triggers + node_modules scanned

3 participants