Skip to content

Fix include regex to support slash in paths#523

Open
Ayushishivhare09 wants to merge 3 commits intofortran-lang:masterfrom
Ayushishivhare09:fix-include-regex-slash
Open

Fix include regex to support slash in paths#523
Ayushishivhare09 wants to merge 3 commits intofortran-lang:masterfrom
Ayushishivhare09:fix-include-regex-slash

Conversation

@Ayushishivhare09
Copy link
Copy Markdown

Fix include regex to support paths with slashes

Problem

The regex for parsing #include statements does not correctly capture paths containing /.

Example:
#include "petsc/finclude/petscvec.h"

was parsed as:
petsc

Solution

Updated regex to include / in the captured path.

Changes

  • Fixed regex in regex_patterns.py
  • Added test for include paths with slashes

Fixes #481

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.43%. Comparing base (fc68d91) to head (da69164).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #523   +/-   ##
=======================================
  Coverage   44.43%   44.43%           
=======================================
  Files          35       35           
  Lines        4803     4803           
=======================================
  Hits         2134     2134           
  Misses       2669     2669           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Ayushishivhare09
Copy link
Copy Markdown
Author

Hi @gnikit,

Just a gentle follow-up on this PR
All checks are passing, and I’ve added a test to cover the reported issue.

As the GSoC 2026 proposal deadline is approaching, I would really appreciate a review whenever you have a moment.

Thanks for your time and guidance — looking forward to your feedback!

@Ayushishivhare09 Ayushishivhare09 force-pushed the fix-include-regex-slash branch from 150ab8d to da69164 Compare March 30, 2026 06:36
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.

Regex pattern for include fails to catch slash

1 participant