Skip to content

Commit cdc4512

Browse files
authored
Fixup linting (#442)
* Fix check license issues. * Ignore some revive naming issues. * Update minimum Go versions. * Update go fmt for newer Go versions * Update Go CI versions. * Repac fixtures. * Use cimg/go. Signed-off-by: SuperQ <superq@gmail.com>
1 parent fba575d commit cdc4512

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+86
-28
lines changed

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 2.1
44
jobs:
55
lint:
66
docker:
7-
- image: cimg/go:1.16
7+
- image: cimg/go:1.18
88
steps:
99
- checkout
1010
- run: make check_license
@@ -23,7 +23,7 @@ jobs:
2323
type: boolean
2424
default: true
2525
docker:
26-
- image: circleci/golang:<< parameters.go_version >>
26+
- image: cimg/go:<< parameters.go_version >>
2727
environment:
2828
GOOS: "<< parameters.os >>"
2929
steps:
@@ -54,19 +54,19 @@ workflows:
5454
matrix:
5555
parameters:
5656
go_version:
57-
- "1.13"
58-
- "1.14"
5957
- "1.15"
6058
- "1.16"
59+
- "1.17"
60+
- "1.18"
6161
- test:
6262
name: test-windows
6363
os: windows
6464
run_test: false
6565
matrix:
6666
parameters:
6767
go_version:
68-
- "1.13"
69-
- "1.14"
7068
- "1.15"
7169
- "1.16"
70+
- "1.17"
71+
- "1.18"
7272
- codespell

cmdline_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build linux
1415
// +build linux
1516

1617
package procfs

cpuinfo.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build linux
1415
// +build linux
1516

1617
package procfs

cpuinfo_armx.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build linux && (arm || arm64)
1415
// +build linux
1516
// +build arm arm64
1617

cpuinfo_mipsx.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build linux && (mips || mipsle || mips64 || mips64le)
1415
// +build linux
1516
// +build mips mipsle mips64 mips64le
1617

cpuinfo_others.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14-
// +build linux
15-
// +build !386,!amd64,!arm,!arm64,!mips,!mips64,!mips64le,!mipsle,!ppc64,!ppc64le,!riscv64,!s390x
14+
//go:build linux && !386 && !amd64 && !arm && !arm64 && !mips && !mips64 && !mips64le && !mipsle && !ppc64 && !ppc64le && !riscv64 && !s390x
15+
// +build linux,!386,!amd64,!arm,!arm64,!mips,!mips64,!mips64le,!mipsle,!ppc64,!ppc64le,!riscv64,!s390x
1616

1717
package procfs
1818

cpuinfo_ppcx.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build linux && (ppc64 || ppc64le)
1415
// +build linux
1516
// +build ppc64 ppc64le
1617

cpuinfo_riscvx.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build linux && (riscv || riscv64)
1415
// +build linux
1516
// +build riscv riscv64
1617

cpuinfo_s390x.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build linux
1415
// +build linux
1516

1617
package procfs

cpuinfo_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build linux
1415
// +build linux
1516

1617
package procfs

0 commit comments

Comments
 (0)