Skip to content

Comments

[REFACTOR] 불필요한 코드 및 파일 제거#29

Merged
ikjeong merged 26 commits intomainfrom
refactor/legacy
Nov 25, 2025
Merged

[REFACTOR] 불필요한 코드 및 파일 제거#29
ikjeong merged 26 commits intomainfrom
refactor/legacy

Conversation

@ikjeong
Copy link
Contributor

@ikjeong ikjeong commented Nov 25, 2025

Summary

  • 사용하지 않는 레거시 코드 제거로 코드베이스 정리
  • README 간결화 및 빠른 시작 가이드 최상단 배치
  • 내부 전용 심볼 unexport로 API 표면 축소

Changes

  • 미사용 디렉토리 제거: scripts/, examples/, testdata/
  • 미사용 CLI 도구 제거: cmd/test-adapter/, cmd/test-rbac/
  • 미사용 코드 제거: validator.go, export.go, HTTP mode
  • deprecated 함수 제거: IsAdmin, Validate, Result
  • 내부 전용 심볼 unexport: EnsureConfigDir, response types, registry errors
  • README 703줄 → 125줄로 축소, Quick Start 최상단 배치
  • SETUP.mdREADME.md에 병합 후 삭제
  • prettier 미설치 환경에서 테스트 스킵 처리

- cmd/test-adapter: manual adapter testing utility
- cmd/test-rbac: manual RBAC testing utility
- build.sh (duplicated with Makefile)
- validate-eslint.sh, validate-checkstyle.sh
- installers/ (replaced by npm publish)
- Consolidate test data under tests/ directory
- Update documentation references
- Add prerequisites section with required tools
- Add external tools auto-installation info
- Add troubleshooting section
- Delete engine.go (unused Engine interface, EngineRegistry)
- Delete CanAutoFix() stub method
- Delete AutoFix() stub method
- Remove Validate() method that was not used anywhere in production code
- Remove Result struct that was only used by Validate()
- Remove checkRBAC() and selectFilesForRule() helper methods
- ValidateChanges() is the active API for git change validation
- Remove IsAdmin() function marked as deprecated
- Function was unused across entire codebase
- Replaced by RBAC canEditPolicy permission system
- Remove Loader.verbose field that was never read
- Remove SaveCodePolicy() method that was never called
- Remove ApplyTemplate() wrapper function (use GetTemplate directly)
Remove HTTP mode components:
- Delete startHTTPServer, handleHealthCheck, handleHTTPRequest methods
- Delete handleInitialize, handleToolsList, handleToolsCall methods
- Delete JSONRPCRequest, JSONRPCResponse types (keep RPCError for internal use)
- Remove Server.host field
- Update NewServer signature (remove host parameter)
- Simplify Start() method to stdio-only
- Update cmd/mcp.go to remove --host flag

Remove incomplete test:
- Delete TestFilterConventionsWithDefaults and helper types
- Test only logged JSON without assertions

MCP server now uses stdio mode exclusively for integration with
Claude Desktop, Claude Code, Cursor, and other MCP clients.
Remove unused exported symbols that were never called:
- WithMaxTokens() - default value always used
- WithTemperature() - default value always used
- WithVerbose() - never enabled
- CheckAvailability() - never integrated into workflow

Active API remains: NewClient, WithModel, WithTimeout, Complete
Remove TokenType and Scope fields from OAuthTokenResponse struct.
These fields were decoded from JSON but never read or used anywhere.
Only AccessToken is needed for the OAuth flow.
- LanguageLinterMapping, LLMValidatorEngine를 unexport
- CheckstyleModule, CheckstyleProperty, CheckstyleConfig를 unexport
- PMDRuleset, PMDRule를 unexport
- EnsureConfigDir → ensureConfigDir (내부에서만 사용)
- README.md: remove all emojis, remove deleted testdata/engine references
- AGENTS.md: complete incomplete final sentence
- docs/CONVERT_FEATURE.md: translate to Korean
- docs/CONVERT_USAGE.md: translate to Korean, remove deleted testdata reference
- docs/LINTER_VALIDATION.md: translate to Korean, remove deleted testdata references
- tests/TESTING_GUIDE.md: remove deleted testdata section
- Reduce from 703 to 125 lines
- Move quick start guide to top
- MCP auto-configured during init
- Remove redundant content
@ikjeong ikjeong self-assigned this Nov 25, 2025
@ikjeong ikjeong merged commit 581233a into main Nov 25, 2025
1 check passed
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