Commit 508f2d3
authored
feat: add golangci-lint linter integration with v2.x support (#51)
* feat: add golangci-lint linter core implementation
- Implement Linter interface for golangci-lint
- Add binary download and installation from GitHub releases
- Support cross-platform detection (Linux, macOS, Windows)
- Handle tar.gz and zip extraction based on platform
- Implement execution logic with JSON output format
- Parse golangci-lint JSON output to Violation structs
- Handle exit code 1 as success (violations found)
- Create temporary config file management
* feat: add golangci-lint rule converter with LLM integration
- Implement Converter interface for golangci-lint
- Add LLM-based rule to linter mapping
- Generate .golangci.yml YAML configuration
- Support 9 rule categories (bugs, style, performance, etc.)
- Include comprehensive linter list in LLM prompt
- Validate linter names and generated configuration
* feat: register golangci-lint in global linter registry
- Add register.go with init() function
- Update bootstrap.go with blank import
- Integrate with Symphony CLI linter system
* test: add comprehensive unit tests for golangci-lint
- Add linter_test.go with platform detection tests
- Add parser_test.go with JSON parsing tests
- Add converter_test.go with YAML generation tests
- Achieve >80% code coverage
- Test cross-platform compatibility
- Test error handling and edge cases
* chore: update dependencies for golangci-lint support
- Run go mod tidy
- Ensure gopkg.in/yaml.v3 is available
* fix: update golangci-lint command format in executor
- Change output format flag from --out-format to --format in the golangci-lint command.
- Ensure compatibility with the latest golangci-lint version.
* refactor: enhance golangci-lint integration with formatter support
* style: fix goimports formatting1 parent de0e003 commit 508f2d3
10 files changed
Lines changed: 1860 additions & 1 deletion
File tree
- cmd/sym
- internal/linter/golangcilint
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
32 | 32 | | |
0 commit comments