Commit Graph

23 Commits

Author SHA1 Message Date
Mikko Ylinen
d8eee5022f ci: bump to golangi-lint v2
The config file is migrated using golangci-lint migrate. Three
new staticcheck checks got disabled (QF100x, 1,4, and 8).

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2025-04-01 10:18:22 +03:00
Mikko Ylinen
b14cefd485 ci: fix .golangi.yml against JSONSchema validator
golangci-lint config can be verified using the followint command:
golangci-lint config verify

Our config had some errors so fix them.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2025-02-17 11:04:39 +02:00
Tuomas Katila
8dd5b4aa44 e2e: gpu: add tests for different deployments
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2024-09-11 09:29:58 +03:00
Tuomas Katila
c3a01b91ff cdi: restructure cdi support for more generic use
Pass the whole cdi.spec structure to DeviceInfo and use
cdiCache for interacting with the CDI files on the host.

Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2024-09-04 13:56:22 +03:00
Tuomas Katila
7e5b280cd1 golanci-lint: upgrade to 1.60.3, fix one issue and ignore conversion errors
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2024-08-27 11:40:35 +03:00
Mikko Ylinen
54f9d730e9 ci: move to golangci-lint v1.57.2
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2024-05-02 09:18:27 +03:00
Mikko Ylinen
1e8ab2e024 ci: cleanup linter settings
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-12-15 10:13:45 +02:00
Mikko Ylinen
74bee31c3d ci: update golangci-lint to v1.55.2
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-11-04 09:04:28 +02:00
Tuomas Katila
c7162df440 qat: add heartbeat check and use that as a device healthiness indicator
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-10-13 15:09:04 +03:00
Mikko Ylinen
04471830bc ci: skip linter checks for cmd/vpu_plugin
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-07-17 12:48:46 +03:00
Hyeongju Johannes Lee
6c7804b1e0 Update golang-lint to 1.52.1 and fix newly found errors
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2023-03-22 15:15:30 +02:00
Mikko Ylinen
a2ee5c93bf lint: disable deprecated checks
WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
WARN [runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
WARN [linters context] rowserrcheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters context] structcheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-10-05 09:50:17 +03:00
Ed Bartosh
cec004c398 lint: enable wsl check
Fixes: #392

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2021-12-17 11:48:48 +02:00
Ed Bartosh
dc2a3c2a84 lint: output all found issues
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2021-12-16 12:23:21 +02:00
Hyeongju Johannes Lee
8fc5df7e37 Add govet-fieldalignment
Add govet-fieldalignment to .golangci.yml
Fix errors that come from adding govet-fieldalignment
- by reordering the fields of structs
- by putting nolint:govet annotations

Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2021-09-20 20:59:04 +03:00
Hyeongju Johannes Lee
4bc70ac544 Add goerr113 linter check
Add goerr113 lintercheck
Fix the usage of fmt.Errorf() by wrapping errors
Fix the usage of errors.New()
2021-09-03 11:02:14 +03:00
Hyeongju Johannes Lee
09ba9fde00 Update tool versions and fix errors and warnings that originated from the update
Update tool versions
Fix the errors and warnings originated from the update:
-Correct type deviceInfo (->DeviceInfo) to make it public
-Fix gpu_plugin.go and vpu_plugin_test.go where stylecheck errors occur
-Fix deprecation warnings
-Rename type 'PatcherManager' to 'Manager' to solve exported errors
-Rename type 'SgxMutator' to 'Mutator' to solve exported errors

Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2021-08-25 07:09:34 +00:00
Dmitry Rozhkov
71075d4478 lint: enable exportloopref, prealloc and scopelint checks 2020-08-31 11:10:51 +03:00
Dmitry Rozhkov
be713f1c8b lint: enable errcheck 2020-08-28 16:14:14 +03:00
Dmitry Rozhkov
7ff08ee874 linter: enable staticcheck 2020-08-25 09:54:59 +03:00
Dmitry Rozhkov
339cdee501 linter: enable nakedret check 2020-06-23 12:04:35 +03:00
Dmitry Rozhkov
73aea0aa1b linter: enable gosec check 2020-06-11 17:56:24 +03:00
Dmitry Rozhkov
70f862f2aa add golangci linter
In this initial commit the following checks are disabled due to
excessive amount of changes required:
- dupl (duplicate code)
- funlen (function length)
- goerr113 (errors handling expressions)
- gomnd (magic numbers)
- gosec (security)
- nakedret (naked returns)
- wsl (forces to use empty lines)
- errcheck (checking for unchecked errors)
- staticcheck (static analysis)
2020-06-08 14:01:13 +03:00