Repository: gonum/gonum (language: go)

Issue:
all: fix ST1000, ST102[012] errors
```
$ staticcheck -checks="ST1000,ST1020,ST1021,ST1022" ./...
doc.go:5:1: package comment should be of the form "Package gonum ..." (ST1000)
dsp/window/window_complex.go:9:1: comment on exported function RectangularComplex should be of the form "RectangularComplex ..." (ST1020)
floats/floats.go:636:1: comment on exported function Reverse should be of the form "Reverse ..." (ST1020)
graph/formats/dot/internal/errors/doc.go:5:1: package comment should be of the form "Package errors ..." (ST1000)
graph/path/internal/testgraphs/doc.go:5:1: package comment should be of the form "Package testgraphs ..." (ST1000)
integrate/quad/quad.go:21:1: comment on exported type FixedLocationSingler should be of the form "FixedLocationSingler ..." (with optional leading article) (ST1021)
lapack/lapack.go:224:1: comment on exported type MaximizeNormXJob should be of the form "MaximizeNormXJob ..." (with optional leading article) (ST1021)
lapack/testlapack/dgesc2.go:1:1: package comment should be of the form "Package testlapack ..." (ST1000)
mat/lu.go:240:1: comment on exported method Pivot should be of the form "Pivot ..." (ST1020)
mathext/internal/amos/amos.go:520:1: comment on exported function Zbknu should be of the form "Zbknu ..." (ST1020)
mathext/internal/amos/amos.go:1218:1: comment on exported function Zkscl should be of the form "Zkscl ..." (ST1020)
mathext/internal/amos/amos.go:1391:1: comment on exported function Zacai should be of the form "Zacai ..." (ST1020)
mathext/internal/amos/amos.go:1516:1: comment on exported function Zasyi should be of the form "Zasyi ..." (ST1020)
mathext/internal/amos/amos.go:1719:1: comment on exported function Zmlri should be of the form "Zmlri ..." (ST1020)
mathext/internal/cephes/ndtri.go:23:1: comment on exported var P0 should be of the form "P0 ..." (ST1022)
mathext/internal/cephes/ndtri.go:44:1: comment on exported var P1 should be of the form "P1 ..." (ST1022)
mathext/internal/cephes/ndtri.go:70:1: comment on exported var P2 should be of the form "P2 ..." (ST1022)
optimize/convex/lp/simplex.go:5:1: package comment should be of the form "Package lp ..." (ST1000)
spatial/r2/box.go:34:1: comment on exported method Empty should be of the form "Empty ..." (ST1020)
spatial/r3/box.go:24:1: comment on exported method Empty should be of the form "Empty ..." (ST1020)
```


Discussion / hints:

Fix patch:
diff --git a/dsp/window/window_complex.go b/dsp/window/window_complex.go
index 404d5232c..9ee0bae9d 100644
--- a/dsp/window/window_complex.go
+++ b/dsp/window/window_complex.go
@@ -6,8 +6,8 @@ package window
 
 import "math"
 
-// Rectangular modifies seq in place by the Rectangular window and returns
-// the result.
+// RectangularComplex modifies seq in place by the Rectangular window and
+// returns the result.
 // See https://en.wikipedia.org/wiki/Window_function#Rectangular_window and
 // https://www.recordingblogs.com/wiki/rectangular-window for details.
 //
diff --git a/floats/floats.go b/floats/floats.go
index 3dd351d00..68c4e65c7 100644
--- a/floats/floats.go
+++ b/floats/floats.go
@@ -633,9 +633,9 @@ func Prod(s []float64) float64 {
 	return prod
 }
 
-// Deprecated: This function simply calls [slices.Reverse].
-//
 // Reverse reverses the order of elements in the slice.
+//
+// Deprecated: This function simply calls [slices.Reverse].
 func Reverse(s []float64) {
 	slices.Reverse(s)
 }
diff --git a/graph/formats/dot/internal/errors/doc.go b/graph/formats/dot/internal/errors/doc.go
index 960624236..58cab6320 100644
--- a/graph/formats/dot/internal/errors/doc.go
+++ b/graph/formats/dot/internal/errors/doc.go
@@ -2,5 +2,5 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// Package error provides generated internal error functions for DOT parsing.
+// Package errors provides generated internal error functions for DOT parsing.
 package errors // import "gonum.org/v1/gonum/graph/formats/dot/internal/errors"
diff --git a/integrate/quad/quad.go b/integrate/quad/quad.go
index 121dd9489..b4fa0cf71 100644
--- a/integrate/quad/quad.go
+++ b/integrate/quad/quad.go
@@ -18,9 +18,11 @@ type FixedLocationer interface {
 	FixedLocations(x, weight []float64, min, max float64)
 }
 
-// FixedLocationSingle returns the location and weight for element k in a
-// fixed quadrature rule with n total samples and integral bounds from min to max.
+// FixedLocationSingler wraps the FixedLocationSingle method.
 type FixedLocationSingler interface {
+	// FixedLocationSingle returns the location and weight for
+	// element k in a fixed quadrature rule with n total samples
+	// and integral bounds from min to max.
 	FixedLocationSingle(n, k int, min, max float64) (x, weight float64)
 }
 
diff --git a/lapack/lapack.go b/lapack/lapack.go
index 60b5d0d36..60ef1c244 100644
--- a/lapack/lapack.go
+++ b/lapack/lapack.go
@@ -221,7 +221,7 @@ const (
 	EVSelected EVHowMany = 'S' // Compute selected right and/or left eigenvectors.
 )
 
-// MaximizeNormX specifies the heuristic method for computing a contribution to
+// MaximizeNormXJob specifies the heuristic method for computing a contribution to
 // the reciprocal Dif-estimate in Dlatdf.
 type MaximizeNormXJob byte
 
diff --git a/mat/lu.go b/mat/lu.go
index 18ed3dab6..b530ada7e 100644
--- a/mat/lu.go
+++ b/mat/lu.go
@@ -237,6 +237,8 @@ func (lu *LU) RowPivots(dst []int) []int {
 	return dst
 }
 
+// Pivot returns the row pivots of the receiver.
+//
 // Deprecated: Use RowPivots instead.
 func (lu *LU) Pivot(dst []int) []int {
 	return lu.RowPivots(dst)
diff --git a/optimize/convex/lp/simplex.go b/optimize/convex/lp/simplex.go
index 5fd0dd867..b03d300cd 100644
--- a/optimize/convex/lp/simplex.go
+++ b/optimize/convex/lp/simplex.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// package lp implements routines for solving linear programs.
+// Package lp implements routines for solving linear programs.
 package lp
 
 import (
diff --git a/spatial/r2/box.go b/spatial/r2/box.go
index 6c988b3b5..d3bc52230 100644
--- a/spatial/r2/box.go
+++ b/spatial/r2/box.go
@@ -31,7 +31,7 @@ func (a Box) Center() Vec {
 	return Scale(0.5, Add(a.Min, a.Max))
 }
 
-// IsEmpty returns true if a Box's volume is zero
+// Empty returns true if a Box's volume is zero
 // or if a Min component is greater than its Max component.
 func (a Box) Empty() bool {
 	return a.Min.X >= a.Max.X || a.Min.Y >= a.Max.Y
diff --git a/spatial/r3/box.go b/spatial/r3/box.go
index b7552af65..86cf6eb4a 100644
--- a/spatial/r3/box.go
+++ b/spatial/r3/box.go
@@ -21,7 +21,7 @@ func NewBox(x0, y0, z0, x1, y1, z1 float64) Box {
 	}
 }
 
-// IsEmpty returns true if a Box's volume is zero
+// Empty returns true if a Box's volume is zero
 // or if a Min component is greater than its Max component.
 func (a Box) Empty() bool {
 	return a.Min.X >= a.Max.X || a.Min.Y >= a.Max.Y || a.Min.Z >= a.Max.Z


Test patch:
diff --git a/graph/path/internal/testgraphs/doc.go b/graph/path/internal/testgraphs/doc.go
index 2845d1308..4f797bddf 100644
--- a/graph/path/internal/testgraphs/doc.go
+++ b/graph/path/internal/testgraphs/doc.go
@@ -2,6 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// Package testsgraphs provides a number of graphs used for testing
+// Package testgraphs provides a number of graphs used for testing
 // routines in the path and path/dynamic packages.
 package testgraphs // import "gonum.org/v1/gonum/graph/path/internal/testgraphs"
diff --git a/lapack/testlapack/dgesc2.go b/lapack/testlapack/dgesc2.go
index 90c422726..dd48ca90c 100644
--- a/lapack/testlapack/dgesc2.go
+++ b/lapack/testlapack/dgesc2.go
@@ -1,6 +1,7 @@
 // Copyright ©2021 The Gonum Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
+
 package testlapack
 
 import (