Skip to content

Migrate to golangci-lint v2 and fix linting issues#3

Merged
umputun merged 3 commits intomasterfrom
linter-improvements
Apr 10, 2025
Merged

Migrate to golangci-lint v2 and fix linting issues#3
umputun merged 3 commits intomasterfrom
linter-improvements

Conversation

@umputun
Copy link
Member

@umputun umputun commented Apr 9, 2025

Summary

  • Migrate to golangci-lint v2 configuration format
  • Update GitHub CI workflow to use the latest linter version
  • Fix gosec security issues for file operations with proper validation
  • Improve error handling throughout the codebase
  • Update test assertions to use proper testify methods
  • Fix unhandled errors in various operations

Implementation Details

  • Added proper error handling for stdout/stderr writes
  • Improved file path validation for security
  • Fixed environment variable operations error handling
  • Added proper file security checks
  • Refactored code to reduce complexity
  • Fixed test assertions to use more idiomatic testify methods

umputun added 2 commits April 9, 2025 18:41
- Add FTPTestContainer for testing FTP file transfers
- Implement methods for uploading, downloading, and listing files
- Add comprehensive path handling for directories
- Add secure file operations with path validation
- Update README with documentation and examples
- Add golangci-lint v2 configuration file
- Update CI workflow to use golangci-lint v2
- Fix error handling in stdout/stderr captures
- Improve file security with path validation
- Add safe handling for file operations
- Fix unhandled errors in environment variable operations
- Update test assertions for better reliability
@umputun umputun requested a review from Copilot April 9, 2025 23:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 13 out of 14 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • go.mod: Language not supported

fix typo

Co-authored-by: Copilot <[email protected]>
@umputun umputun merged commit 44c7fb8 into master Apr 10, 2025
3 checks passed
@umputun umputun deleted the linter-improvements branch April 10, 2025 00:00
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.

2 participants