Skip to content

Conversation

@diskshima
Copy link
Owner

Summary

This PR performs code cleanup following the migration to optparse-applicative in PR #90. It renames modules, removes obsolete code, and improves formatting.

Note: This PR is stacked on top of #93 and should be merged after it.

Changes

Module Refactoring:

  • ✅ Renamed src/NewCommandLineParser.hssrc/CommandLineParser.hs
  • ✅ Removed old GetOpt-based CommandLineParser module
  • ✅ Updated imports in Main.hs

Code Cleanup in Main.hs:

  • Removed obsolete comments:
    • "Old..." prefixes on function names
    • "Refactored..." annotations
    • "TODO..." notes that are no longer relevant
  • Removed commented-out imports (System.Console.GetOpt, System.Environment)
  • Improved code formatting:
    • Consistent indentation in case expressions
    • Aligned guard clauses in remoteUrlToRemote
    • Removed unnecessary blank lines
    • Better spacing in record syntax

Impact

  • No functional changes
  • Improves code readability and maintainability
  • Removes ~200 lines of obsolete code and comments

Testing

  • ✅ Project builds successfully with cabal build
  • ✅ All existing functionality preserved
  • ✅ No breaking changes

Related

Part 2 of cleanup for #90 (code cleanup)
Depends on: #93

🤖 Generated with Claude Code

This commit performs code cleanup following the migration to
optparse-applicative in PR #90:

**Module Changes:**
- Rename NewCommandLineParser.hs to CommandLineParser.hs
- Remove old GetOpt-based CommandLineParser module

**Main.hs Cleanup:**
- Update import from NewCommandLineParser to CommandLineParser
- Remove obsolete comments ("Old...", "Refactored...", "TODO...")
- Remove commented-out imports (System.Console.GetOpt, System.Environment)
- Improve code formatting and consistency
- Remove unnecessary blank lines
- Align guard clauses in remoteUrlToRemote

All changes maintain backward compatibility while improving code
readability and maintainability.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@diskshima diskshima merged commit c313b0f into refactor-module-naming-pr90 Oct 11, 2025
@diskshima diskshima deleted the cleanup-code-pr90 branch October 11, 2025 07:46
diskshima added a commit that referenced this pull request Oct 11, 2025
… → CommandLineParser) (#93)

* Refactor: Rename NewCommandLineParser to CommandLineParser in cabal config

Update the gwcli.cabal file to reflect the module rename from
NewCommandLineParser to CommandLineParser, removing the old module
from the exposed-modules list.

Also add cabal.project.freeze to lock dependency versions for
reproducible builds with GHC 9.12.1 and Cabal 3.14.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Refactor: Clean up code after optparse-applicative migration (#94)

* Refactor: Clean up code after optparse-applicative migration

This commit performs code cleanup following the migration to
optparse-applicative in PR #90:

**Module Changes:**
- Rename NewCommandLineParser.hs to CommandLineParser.hs
- Remove old GetOpt-based CommandLineParser module

**Main.hs Cleanup:**
- Update import from NewCommandLineParser to CommandLineParser
- Remove obsolete comments ("Old...", "Refactored...", "TODO...")
- Remove commented-out imports (System.Console.GetOpt, System.Environment)
- Improve code formatting and consistency
- Remove unnecessary blank lines
- Align guard clauses in remoteUrlToRemote

All changes maintain backward compatibility while improving code
readability and maintainability.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Bump version to 0.9.8.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>

* Update changelog for version 0.9.8.0

Add changelog entries documenting the refactoring work:
- Module renaming (NewCommandLineParser to CommandLineParser)
- Removal of old GetOpt-based parser
- Code cleanup and formatting improvements
- Maintainability improvements after optparse-applicative migration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
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