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 golangci linters #219

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

obbardc
Copy link
Member

@obbardc obbardc commented Oct 30, 2024

No description provided.

@obbardc obbardc changed the title golangci: Enable all supported linters Enable more golangci linters Oct 30, 2024
@obbardc obbardc force-pushed the wip/obbardc/enable-all-linters branch from 8c49b76 to dd55d94 Compare October 31, 2024 10:12
@obbardc obbardc marked this pull request as ready for review October 31, 2024 10:13
@obbardc obbardc self-assigned this Oct 31, 2024
Fix the mistakes found by the misspell linter:

	backend_qemu.go:55:56: `usefull` is a misspelling of `useful` (misspell)
			/* The default cpu is a 32 bit one, which isn't very usefull
			                                                     ^
	machine.go:243:39: `especialy` is a misspelling of `especially` (misspell)
		// Mounts for java VM configuration, especialy security policies
	    	                                     ^

Signed-off-by: Christopher Obbard <[email protected]>
Fix the mistakes found by the revive linter:

	cmd/fakemachine/main.go:149:10: superfluous-else: if block ends with call to os.Exit function, so drop this else and outdent its block (revive)
			} else {
				os.Exit(1)
			}
	decompressors_test.go:42:3: increment-decrement: should replace i += 1 with i++ (revive)
			i += 1
			^
	backend_qemu.go:178:38: unused-parameter: parameter 'mount' seems to be unused, consider removing or renaming it as _ (revive)
	func (b qemuBackend) MountParameters(mount mountPoint) (string, []string) {
	                                     ^
	machine.go:569:3: increment-decrement: should replace i += 1 with i++ (revive)
			i += 1
			^

Signed-off-by: Christopher Obbard <[email protected]>
These linters seem to be useful. Enable them.

Signed-off-by: Christopher Obbard <[email protected]>
@sjoerdsimons sjoerdsimons force-pushed the wip/obbardc/enable-all-linters branch from dd55d94 to 2faab3c Compare November 9, 2024 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant