Skip to content

Conversation

guitarrapc
Copy link
Owner

No description provided.

@Copilot Copilot AI review requested due to automatic review settings June 8, 2025 16:56
Copilot

This comment was marked as outdated.

@guitarrapc guitarrapc requested a review from Copilot June 8, 2025 18:03
Copilot

This comment was marked as outdated.

@guitarrapc guitarrapc requested a review from Copilot June 8, 2025 18:16
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 implements enhanced ignore-pattern support by introducing gitignore-style matching, path normalization utilities, and updates to the file-linking logic, along with related documentation and tests.

  • Adds platform-agnostic path normalization methods for display and pattern matching.
  • Introduces a dynamic‐programming-based wildcard matcher and a gitignore‐style pattern matcher.
  • Updates FileLinkerService to use the enhanced ignore logic and normalizes logged paths; adds and adapts tests and documentation accordingly.

Reviewed Changes

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

Show a summary per file
File Description
src/DotfilesLinker/Utilities/PathUtilities.cs New NormalizePath and NormalizePathForPatternMatching methods
src/DotfilesLinker/Services/WildcardMatcher.cs Implements DP-based IsMatch for * and ? wildcards
src/DotfilesLinker/Services/GitignoreMatcher.cs Adds gitignore-style pattern parsing and matching
src/DotfilesLinker/Services/FileLinkerService.cs Replaces ignore logic with ShouldIgnoreFileEnhanced and normalizes logs
src/DotfilesLinker.Tests/WildcardMatcherTests.cs Tests for wildcard matching behavior
src/DotfilesLinker.Tests/GitignoreMatcherTests.cs Tests for gitignore-style matching
src/DotfilesLinker.Tests/FileLinkerServicePatternTests.cs Updates reflection helper to call enhanced ignore method
README.md Documents supported ignore-pattern types
README_ja.md Updates Japanese docs for ignore-pattern support
.github/copilot-instructions.md Tweaks workspace-specific instructions
Comments suppressed due to low confidence (4)

src/DotfilesLinker.Tests/FileLinkerServicePatternTests.cs:123

  • The helper method name InvokeShouldIgnoreFile is misleading after updating to call ShouldIgnoreFileEnhanced; consider renaming it to InvokeShouldIgnoreFileEnhanced for clarity.
private bool InvokeShouldIgnoreFile(string fileName, HashSet<string> userIgnorePatterns)

src/DotfilesLinker/Utilities/PathUtilities.cs:36

  • There are no unit tests for NormalizePath and NormalizePathForPatternMatching methods; consider adding tests to verify these normalization behaviors across platforms.
internal static string NormalizePath(string path)

.github/copilot-instructions.md:1

  • [nitpick] This line duplicates the previous instruction about communicating in Japanese; consider removing the redundant entry to avoid confusion.
- やり取りは日本語で行います。

src/DotfilesLinker/Services/FileLinkerService.cs:337

  • [nitpick] ShouldIgnoreFileEnhanced is quite long and handles multiple pattern types; consider splitting into smaller, focused helper methods to improve readability and maintainability.
private bool ShouldIgnoreFileEnhanced(string filePath, string fileName, bool isDir, HashSet<string> userIgnorePatterns)

@guitarrapc guitarrapc merged commit e93d30d into main Jun 8, 2025
11 checks passed
@guitarrapc guitarrapc deleted the feature/ignore branch June 8, 2025 18:28
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