testlapack: clean up lint
MODIFY
lapack/testlapack/dlahr2.go
lapack/testlapack/dlahr2.go
@@ -203,7 +203,10 @@ func Dlahr2Test(t *testing.T, impl Dlahr2er) {
defer r.Close()
var tests []Dlahr2test
- json.NewDecoder(r).Decode(&tests)
+ err = json.NewDecoder(r).Decode(&tests)
+ if err != nil {
+ log.Fatal(err)
+ }
for _, test := range tests {
tau := make([]float64, len(test.TauWant))
for _, ldex := range []int{0, 1, 20} {

MODIFY
lapack/testlapack/dlaqr5.go
lapack/testlapack/dlaqr5.go
@@ -63,7 +63,10 @@ func Dlaqr5Test(t *testing.T, impl Dlaqr5er) {
defer r.Close()
var tests []Dlaqr5test
- json.NewDecoder(r).Decode(&tests)
+ err = json.NewDecoder(r).Decode(&tests)
+ if err != nil {
+ log.Fatal(err)
+ }
for _, test := range tests {
wantt := test.WantT
n := test.N

MODIFY
lapack/testlapack/fortran.go
lapack/testlapack/fortran.go
@@ -13,7 +13,7 @@ import (
// fortran64 is a float64 type that prints as a double precision constant in
// Fortran format.
-type fortran64 float64
+type fortran64 float64 //nolint:unused
func (f fortran64) String() string {
// Replace exponent with D
@@ -24,6 +24,7 @@ func (f fortran64) String() string {
// printFortranArray prints a Go slice as an array that can be copied into a
// fortran script.
+//nolint:deadcode,unused
func printFortranArray(z []float64, name string) {
fmt.Printf("%s(1:%d) = (/%v, &\n", name, len(z), fortran64(z[0]))
for i := 1; i < len(z)-1; i++ {

MODIFY
lapack/testlapack/general.go
lapack/testlapack/general.go
@@ -820,6 +820,7 @@ func constructQPBidiagonal(vect lapack.ApplyOrtho, m, n, nb int, a []float64, ld
// printRowise prints the matrix with one row per line. This is useful for debugging.
// If beyond is true, it prints beyond the final column to lda. If false, only
// the columns are printed.
+//nolint:deadcode,unused
func printRowise(a []float64, m, n, lda int, beyond bool) {
for i := 0; i < m; i++ {
end := n
@@ -1003,6 +1004,7 @@ func equalApproxTriangular(upper bool, n int, a []float64, lda int, b []float64,
return true
}
+//nolint:deadcode,unused
func equalApproxSymmetric(a, b blas64.Symmetric, tol float64) bool {
if a.Uplo != b.Uplo {
return false

testlapack: clean up lint