|
1 | | -run: |
2 | | - timeout: 10m |
| 1 | +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | +# |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
3 | 15 |
|
| 16 | +version: "2" |
4 | 17 | linters: |
5 | 18 | enable: |
6 | 19 | - contextcheck |
7 | 20 | - gocritic |
8 | | - - gofmt |
9 | | - - goimports |
10 | 21 | - gosec |
11 | | - - gosimple |
12 | | - - govet |
13 | | - - ineffassign |
14 | 22 | - misspell |
15 | | - - staticcheck |
16 | 23 | - unconvert |
17 | | - |
18 | | -linters-settings: |
19 | | - goimports: |
20 | | - local-prefixes: github.com/NVIDIA/nvidia-container-toolkit |
21 | | - |
22 | | -issues: |
23 | | - exclude: |
24 | | - # The legacy hook relies on spec.Hooks.Prestart, which is deprecated as of the v1.2.0 OCI runtime spec. |
25 | | - - "SA1019:(.+).Prestart is deprecated(.+)" |
26 | | - # TODO: We should address each of the following integer overflows. |
27 | | - - "G115: integer overflow conversion(.+)" |
28 | | - exclude-rules: |
29 | | - # Exclude the gocritic dupSubExpr issue for cgo files. |
30 | | - - path: internal/dxcore/dxcore.go |
31 | | - linters: |
32 | | - - gocritic |
33 | | - text: dupSubExpr |
34 | | - # Exclude the checks for usage of returns to config.Delete(Path) in the crio and containerd config packages. |
35 | | - - path: pkg/config/engine/ |
36 | | - linters: |
37 | | - - errcheck |
38 | | - text: config.Delete |
39 | | - # RENDERD refers to the Render Device and not the past tense of render. |
40 | | - - path: .*.go |
41 | | - linters: |
42 | | - - misspell |
43 | | - text: "`RENDERD` is a misspelling of `RENDERED`" |
| 24 | + exclusions: |
| 25 | + generated: lax |
| 26 | + presets: |
| 27 | + - comments |
| 28 | + - common-false-positives |
| 29 | + - legacy |
| 30 | + - std-error-handling |
| 31 | + rules: |
| 32 | + # Exclude the gocritic dupSubExpr issue for cgo files. |
| 33 | + - linters: |
| 34 | + - gocritic |
| 35 | + path: internal/dxcore/dxcore.go |
| 36 | + text: dupSubExpr |
| 37 | + # Exclude the checks for usage of returns to config.Delete(Path) in the |
| 38 | + # crio and containerd config packages. |
| 39 | + - linters: |
| 40 | + - errcheck |
| 41 | + path: pkg/config/engine/ |
| 42 | + text: config.Delete |
| 43 | + # RENDERD refers to the Render Device and not the past tense of render. |
| 44 | + - linters: |
| 45 | + - misspell |
| 46 | + path: .*.go |
| 47 | + text: '`RENDERD` is a misspelling of `RENDERED`' |
| 48 | + # The legacy hook relies on spec.Hooks.Prestart, which is deprecated as of |
| 49 | + # the v1.2.0 OCI runtime spec. |
| 50 | + - path: (.+)\.go$ |
| 51 | + text: SA1019:(.+).Prestart is deprecated(.+) |
| 52 | + # TODO: We should address each of the following integer overflows. |
| 53 | + - path: (.+)\.go$ |
| 54 | + text: 'G115: integer overflow conversion(.+)' |
| 55 | + paths: |
| 56 | + - third_party$ |
| 57 | + - builtin$ |
| 58 | + - examples$ |
| 59 | +formatters: |
| 60 | + enable: |
| 61 | + - gofmt |
| 62 | + - goimports |
| 63 | + settings: |
| 64 | + goimports: |
| 65 | + local-prefixes: |
| 66 | + - github.com/NVIDIA/nvidia-container-toolkit |
| 67 | + exclusions: |
| 68 | + generated: lax |
| 69 | + paths: |
| 70 | + - third_party$ |
| 71 | + - builtin$ |
| 72 | + - examples$ |
0 commit comments