Skip to content

Refactor #59

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

Merged
merged 10 commits into from
Apr 20, 2025
Merged

Refactor #59

merged 10 commits into from
Apr 20, 2025

Conversation

nametake
Copy link
Owner

  • change interface{} to any
  • update go.mod
  • fix log
  • add monorepo test

nametake added 10 commits April 19, 2025 20:38
Add Error field to GolangCILintResult struct for better error handling.
Improve logging by:
- Adding Debugf method to logger interface
- Adding early return after logging JSON marshal errors
- Replacing DebugJSON with Debugf for improved command visibility
- Standardizing printf formatting with explicit newlines
Replace interface{} with the any type alias throughout the codebase,
as recommended since Go 1.18. Also improve logging by replacing
the Debugf method with more structured DebugJSON calls and removing
redundant newlines in format strings.
Replace direct os.Stderr usage with log.Writer() to maintain consistency
with Go's standard logging patterns. Add log.LstdFlags to include
timestamps in log output, which improves log readability and debugging.
Remove the obsolete "nolint:gosec" comment from the exec.Command call,
as this code has either been reviewed for security concerns or the
potential issues have been addressed through other means.
Remove unnecessary nolint directives that were previously used to
suppress linter warnings for unused code and magic numbers. These
annotations are no longer needed as the code has been properly
refactored.

Also renamed an unused parameter in handlerWorkspaceDidChange
Configuration to underscore to indicate it's intentionally unused.
Update the sourcegraph/jsonrpc2 dependency from a development version
to the stable v0.2.0 release. This improves code maintainability by
using a versioned dependency rather than a commit hash reference.
Add integration tests for the linter in a monorepo structure with
foo and bar modules that have different linter configurations:
- foo module has wsl enabled but unused disabled
- bar module has both wsl and unused enabled
- Added test fixtures with appropriate .golangci.yaml configs
Enhance test case names to clearly indicate testing of monorepo setup
with multiple go.mod and golangci-yaml files, identifying both foo and
bar module test cases separately for better clarity and documentation.
Update the Go module version requirement to use the latest stable
version of Go. This ensures compatibility with current tooling and
access to recent language improvements and bug fixes.
Change the Go module version requirement from 1.24.2 to 1.23.4 to
ensure better compatibility with existing environments and toolchains
that might not support the newer Go version yet.
@nametake nametake merged commit f635d1a into main Apr 20, 2025
4 checks passed
@nametake nametake deleted the refactor branch April 20, 2025 03:39
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