Skip to content

Add ignore case functionality for search patterns #35

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 1 commit into from
Apr 6, 2024

Conversation

catatsuy
Copy link
Owner

@catatsuy catatsuy commented Apr 6, 2024

This pull request primarily introduces the 'ignore case' feature to the CLI application, allowing users to ignore case sensitivity in regular expressions. It also adds a new 'cover' target to the Makefile to generate a coverage report.

Here are the most important changes:

Addition of 'ignore case' feature:

  • internal/cli/cli.go: Added a new ignoreCase field to the CLI struct [1]. This field is used to determine whether to ignore case sensitivity in regular expressions. The Run and parseFlags methods were updated to accommodate this new field [2] [3] [4]. The compileRegexps function was also modified to prefix all regular expressions with (?i) if ignoreCase is true [5].
  • internal/cli/cli_test.go: Updated the tests to check the 'ignore case' feature. New test cases were added to TestRun_successProcess and TestCompileRegexps to test the functionality of the 'ignore case' feature [1] [2] [3]. The TestFilterProcess test was updated to use the new compileRegexps function signature [4].
  • internal/cli/export_test.go: Updated the CompileRegexps function to use the new compileRegexps function signature.

Addition of 'cover' target in Makefile:

  • Makefile: Added a new 'cover' target that generates a coverage report using go test -coverprofile and go tool cover -html.

Test data changes:

@catatsuy catatsuy merged commit 57b3c32 into main Apr 6, 2024
@catatsuy catatsuy deleted the feature_add_ignore_case branch April 6, 2024 08:27
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