Skip to content
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

Refactoring wish list #59

Closed
7 of 16 tasks
mudge opened this issue Oct 22, 2022 · 0 comments
Closed
7 of 16 tasks

Refactoring wish list #59

mudge opened this issue Oct 22, 2022 · 0 comments
Assignees
Labels

Comments

@mudge
Copy link
Owner

mudge commented Oct 22, 2022

Following the recent releases of the gem, there are a few things I’d like to clean up/investigate to improve maintainability without changing functionality:

  • Remove duplicated logic to look up submatches by index
  • Remove duplicated logic to look up submatches by name
  • Replace macros (most likely with functions)
  • Mark pointers as const where they are unchanged by a function
  • Remove unnecessary casting during pointer arithmetic
  • Remove use of RUBY_METHOD_FUNC to fix deprecation warnings on modern Rubies
  • Explicitly test against C++03
  • Use references where possible (specifically NamedCapturingGroups)
  • Remove using in favour of explicit namespaces
  • Pass cpplint?
  • Document match’s behaviour with patterns without submatches
  • Mark non-recommended parts of API (mostly from the DCI days)
  • Lean on StringPiece’s automatic conversion from char * when looking up submatches by name
  • Mark all functions as file static
  • Ensure there’s test coverage around features that behave differently across Ruby and re2 versions (e.g. things affected by encoding or bytes vs characters)
  • Document commitment to backward compatibility?
@mudge mudge self-assigned this Oct 22, 2022
mudge added a commit that referenced this issue Oct 24, 2022
mudge added a commit that referenced this issue Oct 24, 2022
mudge added a commit that referenced this issue Oct 24, 2022
mudge added a commit that referenced this issue Oct 24, 2022
mudge added a commit that referenced this issue Oct 25, 2022
@mudge mudge changed the title Refactor fetching matches by name and index Refactoring wish list Oct 30, 2022
@mudge mudge added the feature label Sep 17, 2023
@mudge mudge closed this as completed Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant