miller/pkg
John Kerl 2bec10fc54
Fix govet lint findings; fix masked unset-on-array error path (#2129)
* plans/lintfixes.md

* plans/lintfixes.md

* Fix remaining govet lint findings

- Rename MarshalJSON -> FormatAsJSON on Mlrval and Mlrmap (govet
  stdmethods): the methods shadowed json.Marshaler with an
  incompatible signature.
- Remove unreachable return after exhaustive if-else in
  pkg/mlrval/mlrval_collections.go (govet unreachable).
- Update plans/lintfixes.md with current status: 84 findings remain
  (50 errcheck, 34 staticcheck).

Part of #2109.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Return nil on successful single-index array unset

removeIndexedOnArray removed the element on the in-bounds path but
then fell through to return an "array index out of bounds for unset"
error, so the success path never returned nil. Callers currently
ignore the error, which masked this; return nil on success so that
upcoming errcheck fixes can propagate the error meaningfully. This
matches removeIndexedOnMap, which returns nil on success.

Add unit tests for RemoveIndexed on arrays.

Part of #2109.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 10:31:08 -04:00
..
auxents Convert if/else-if chains to typed switch statements (staticcheck QF1003) (#2112) 2026-06-28 18:27:42 -04:00
bifs Fix govet lint findings; fix masked unset-on-array error path (#2129) 2026-07-03 10:31:08 -04:00
cli Next batch of lint fixes (#2108) 2026-06-28 17:36:36 -04:00
climain Convert if/else-if chains to typed switch statements (staticcheck QF1003) (#2112) 2026-06-28 18:27:42 -04:00
colorizer Strip dead code from pkg/ (#2121) 2026-07-01 19:32:13 -04:00
dkvpx Strip dead code from pkg/ (#2121) 2026-07-01 19:32:13 -04:00
dsl Convert if/else-if chains to typed switch statements (staticcheck QF1003) (#2112) 2026-06-28 18:27:42 -04:00
entrypoint Improve error propagation (#1975) 2026-02-16 16:48:41 -05:00
go-csv Some fixes for staticcheck (#2006) 2026-03-03 09:27:03 -05:00
input Next batch of lint fixes (#2108) 2026-06-28 17:36:36 -04:00
lib Strip dead code from pkg/ (#2121) 2026-07-01 19:32:13 -04:00
mlrval Fix govet lint findings; fix masked unset-on-array error path (#2129) 2026-07-03 10:31:08 -04:00
output Fix govet lint findings; fix masked unset-on-array error path (#2129) 2026-07-03 10:31:08 -04:00
parsing Replace GOCC parser-generator with PGPG (#2015) 2026-03-15 22:28:57 -04:00
pbnjay-strptime Performance and style fixes (#1981) 2026-02-18 09:19:31 -05:00
platform Performance and style fixes (#1981) 2026-02-18 09:19:31 -05:00
runtime Pool DSL stack-frame sets across UDF/subroutine calls (~31% perf on function-heavy mlr put) (#2088) 2026-06-19 17:04:19 -04:00
scan Strip dead code from pkg/ (#2121) 2026-07-01 19:32:13 -04:00
stream Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
terminals Strip dead code from pkg/ (#2121) 2026-07-01 19:32:13 -04:00
transformers Convert if/else-if chains to typed switch statements (staticcheck QF1003) (#2112) 2026-06-28 18:27:42 -04:00
types Strip dead code from pkg/ (#2121) 2026-07-01 19:32:13 -04:00
version Post-6.19.0 release: back to 6.19.0-dev 2026-06-19 19:34:20 -04:00
README.md Export library code in pkg/ (#1391) 2023-09-10 17:15:13 -04:00

Please see ../../README-dev.md for an overview; please see each subdirectory for details about it.