Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable more revive lint rules #1511

Merged
merged 8 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ linters-settings:
disabled: false
arguments:
- "preserveScope"
- name: package-comments
disabled: false

issues:
exclude-rules:
Expand Down
1 change: 0 additions & 1 deletion ee/tables/ioreg/ioreg.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// As the returned data is a complex nested plist, this uses the
// dataflatten tooling. (See
// https://godoc.org/github.com/kolide/launcher/ee/dataflatten)

package ioreg

import (
Expand Down
1 change: 0 additions & 1 deletion ee/tables/mdmclient/mdmclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// Package mdmclient provides a table that parses the mdmclient
// output. Empirically, this seems to be an almost gnustep
// plist. With some headers. So, unwind that.

package mdmclient

import (
Expand Down
1 change: 0 additions & 1 deletion ee/tables/profiles/profiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// As the returned data is a complex nested plist, this uses the
// dataflatten tooling. (See
// https://godoc.org/github.com/kolide/launcher/ee/dataflatten)

package profiles

import (
Expand Down
1 change: 0 additions & 1 deletion ee/tables/pwpolicy/pwpolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// As the returned data is a complex nested plist, this uses the
// dataflatten tooling. (See
// https://godoc.org/github.com/kolide/launcher/ee/dataflatten)

package pwpolicy

import (
Expand Down
35 changes: 17 additions & 18 deletions ee/tables/systemprofiler/systemprofiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,26 @@
//
// Everything, minimal details:
//
// osquery> select count(*) from kolide_system_profiler where datatype like "%" and detaillevel = "mini";
// +----------+
// | count(*) |
// +----------+
// | 1270 |
// +----------+
// osquery> select count(*) from kolide_system_profiler where datatype like "%" and detaillevel = "mini";
// +----------+
// | count(*) |
// +----------+
// | 1270 |
// +----------+
//
// Multiple data types (slightly redacted):
//
// osquery> select fullkey, key, value, datatype from kolide_system_profiler where datatype in ("SPCameraDataType", "SPiBridgeDataType");
// +----------------------+--------------------+------------------------------------------+-------------------+
// | fullkey | key | value | datatype |
// +----------------------+--------------------+------------------------------------------+-------------------+
// | 0/spcamera_unique-id | spcamera_unique-id | 0x1111111111111111 | SPCameraDataType |
// | 0/_name | _name | FaceTime HD Camera | SPCameraDataType |
// | 0/spcamera_model-id | spcamera_model-id | UVC Camera VendorID_1452 ProductID_30000 | SPCameraDataType |
// | 0/_name | _name | Controller Information | SPiBridgeDataType |
// | 0/ibridge_build | ibridge_build | 14Y000 | SPiBridgeDataType |
// | 0/ibridge_model_name | ibridge_model_name | Apple T1 Security Chip | SPiBridgeDataType |
// +----------------------+--------------------+------------------------------------------+-------------------+

// osquery> select fullkey, key, value, datatype from kolide_system_profiler where datatype in ("SPCameraDataType", "SPiBridgeDataType");
// +----------------------+--------------------+------------------------------------------+-------------------+
// | fullkey | key | value | datatype |
// +----------------------+--------------------+------------------------------------------+-------------------+
// | 0/spcamera_unique-id | spcamera_unique-id | 0x1111111111111111 | SPCameraDataType |
// | 0/_name | _name | FaceTime HD Camera | SPCameraDataType |
// | 0/spcamera_model-id | spcamera_model-id | UVC Camera VendorID_1452 ProductID_30000 | SPCameraDataType |
// | 0/_name | _name | Controller Information | SPiBridgeDataType |
// | 0/ibridge_build | ibridge_build | 14Y000 | SPiBridgeDataType |
// | 0/ibridge_model_name | ibridge_model_name | Apple T1 Security Chip | SPiBridgeDataType |
// +----------------------+--------------------+------------------------------------------+-------------------+
package systemprofiler

import (
Expand Down
3 changes: 1 addition & 2 deletions pkg/make/builder.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
Package make provides some simple functions to handle build and go

Package make provides some simple functions to handle build and go
dependencies.

We used to do this with gnumake rules, but as we added windows
Expand Down
1 change: 0 additions & 1 deletion pkg/osquery/runsimple/osqueryrunner.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Package runsimple is meant as a simple runner for osquery. It is initial just handling one off executions, but may
// perhaps, expand to also handling daemonization

package runsimple

import (
Expand Down
1 change: 0 additions & 1 deletion pkg/windows/oleconv/oleconv.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//
// It is originally from
// https://github.com/ceshihao/windowsupdate/blob/master/oleconv.go

package oleconv

import (
Expand Down
Loading