Skip to content

feat: add --version and --verbose options #5

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 9 commits into from
Apr 20, 2025
Merged

Conversation

guitarrapc
Copy link
Owner

No description provided.

@Copilot Copilot AI review requested due to automatic review settings April 20, 2025 16:33
@guitarrapc guitarrapc enabled auto-merge April 20, 2025 16:33
Copy link
Contributor

@Copilot 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.

Pull Request Overview

This PR introduces support for the --version and --verbose command-line options while improving logging across the application. Key changes include:

  • Adding an optional ILogger parameter (with a default NullLogger) to FileLinkerService and logging enhancements.
  • Implementing new command-line options (--help, --version, --verbose) in Program.cs with corresponding help and version displays.
  • Adding support for reading file lines via IFileSystem and updating tests to cover the new ReadAllLines functionality.

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/DotfilesLinker/Services/FileLinkerService.cs Updated constructor and logging statements for better traceability.
src/DotfilesLinker/Services/ConsoleLogger.cs Introduced new ConsoleLogger using primary constructor syntax.
src/DotfilesLinker/Program.cs Added command-line options and help/version display logic.
src/DotfilesLinker/Infrastructure/IFileSystem.cs Added a new ReadAllLines method in the file system abstraction.
src/DotfilesLinker/Infrastructure/DefaultFileSystem.cs Implemented ReadAllLines using File.ReadAllLines.
src/DotfilesLinker.Tests/FileSystemTests.cs Added tests for the new ReadAllLines method.
src/DotfilesLinker.Tests/FileLinkerServiceTests.cs Adjusted tests to reflect ignore file handling changes.
README_JP.md Updated documentation in Japanese with repository details.
README.md Revised quick start instructions and examples for clarity.
.github/workflows/release.yaml Updated publish command to include TAG for versioning.
Files not reviewed (1)
  • src/DotfilesLinker/DotfilesLinker.csproj: Language not supported

drwxr-xr-x 3 root root 4096 Mar 27 02:33 ..
-rw-r--r-- 1 guitarrapc guitarrapc 4015 Mar 27 02:38 .bashrc
lrwxrwxrwx 1 guitarrapc guitarrapc 64 Mar 27 02:38 .bashrc_custom -> /home/guitarrapc/github/guitarrapc/dotfiles/.bashrc_custom
lrwxrwxrwx 1 guitarrapapc 60 Mar 27 02:38 .gitconfig -> /home/guitarrapc/github/guitarrapc/dotfiles/.gitconfig
Copy link
Preview

Copilot AI Apr 20, 2025

Choose a reason for hiding this comment

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

The username 'guitarrapapc' appears to be a typo; please verify if it should be 'guitarrapc'.

Suggested change
lrwxrwxrwx 1 guitarrapapc 60 Mar 27 02:38 .gitconfig -> /home/guitarrapc/github/guitarrapc/dotfiles/.gitconfig
lrwxrwxrwx 1 guitarrapc guitarrapc 60 Mar 27 02:38 .gitconfig -> /home/guitarrapc/github/guitarrapc/dotfiles/.gitconfig

Copilot uses AI. Check for mistakes.

@guitarrapc guitarrapc merged commit bcbbd0c into main Apr 20, 2025
10 checks passed
@guitarrapc guitarrapc deleted the feature/update branch April 20, 2025 16:35
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