Skip to content

Fix golangci-lint warnings for most files#463

Open
ChetanFTW wants to merge 1 commit intourunc-dev:mainfrom
ChetanFTW:formating_and_lint_warning
Open

Fix golangci-lint warnings for most files#463
ChetanFTW wants to merge 1 commit intourunc-dev:mainfrom
ChetanFTW:formating_and_lint_warning

Conversation

@ChetanFTW
Copy link

@ChetanFTW ChetanFTW commented Feb 8, 2026

Description

This PR fixes 97 linting warnings reported by golangci-lint.

✅ Changes made:

  • Error handling (errcheck): Checked all error returns from functions like Close(), os.Remove, etc.
  • Documentation (revive): Added package comments for files missing them, and comments for exported functions, types, and constants.
  • Code style (staticcheck): Fixed minor issues like capitalized error messages.

⚠️ Remaining Warnings:

  • gosec: potential file inclusion via variables, directory/file permissions.
  • Some remaining revive warnings in a few files.
  • These are left for follow-up PRs to keep this PR focused.
    No functional changes were made; this PR is purely for improving code quality and readability, making the repo more Go-best-practices compliant.

Related issues

Fixes #462

How was this tested?

  • Ran golangci-lint run — all fixed warnings are gone.
  • Verified no functional changes occur; only linting, documentation, and minor error handling fixes.

Before:

Screenshot from 2026-02-08 13-19-48

After:

Screenshot from 2026-02-08 13-20-01

Remaining:

**** 61 warnings remain ****

@netlify
Copy link

netlify bot commented Feb 8, 2026

Deploy Preview for urunc ready!

Name Link
🔨 Latest commit c0555c9
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6988943d0ef34a00082b4add
😎 Deploy Preview https://deploy-preview-463--urunc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ChetanFTW
Copy link
Author

Hi @cmainas @ananos, hope you're doing well
Could you please take a look ?

@cmainas
Copy link
Contributor

cmainas commented Feb 9, 2026

Hello @ChetanFTW ,

thank you for the fixes. Overall, it would better to wait for an issue to get verified before opening a PR. As I mentioned in the issue, urunc already makes use of golangci-lint, but selecting specific linters and formatters. Therefore, not all warnings and errors are useful for us. Furthermore, for these kind of changes it is better to break them in smaller PRs.

We are exploring which linters and formatters to enable and I would suggest to revisit this when we integrate the linters and formatters in our CI, so we can automatically check against new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix golangci-lint warnings for most files

2 participants