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

Make C/C++/ObjC include directive scanning pattern more strict #362

Merged
merged 1 commit into from
Mar 3, 2024

Conversation

Lastique
Copy link
Contributor

@Lastique Lastique commented Feb 23, 2024

Proposed changes

  1. Require that the directive is at the beginning of a line, sans leading spaces.
  2. Require that the header name is not empty.

This eliminates majority of comments that look like #include directives. One practical example is a comment in Boost.Wave that has #include <> and #include "" in its body.

This issue came up during Boost 1.85 release preparation.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Documentation content changes
  • Other (please describe):

Checklist

  • I searched the discussions
  • I searched the closed and open issues
  • I read the contribution guidelines
  • I added myself to the copyright attributions for significant changes
  • I checked that tests pass locally with my changes
  • I added tests that prove my fix is effective or that my feature works
  • I added necessary documentation (if appropriate)

1. Require that the directive is at the beginning of a line, sans
   leading spaces.
2. Require that the header name is not empty.

This eliminates majority of comments that look like #include directives.
One practical example is a comment in Boost.Wave that has "#include <>"
and "#include """ in its body.
@teeks99
Copy link

teeks99 commented Feb 28, 2024

I wanted to ping this, as I believe it blocks the 1.85 release.

@grafikrobot
Copy link
Member

@teeks99 it doesn't block the release as the error output does not affect actual operation. It's just unsightly, AFAIK.

@teeks99
Copy link

teeks99 commented Feb 28, 2024

it doesn't block the release as the error output does not affect actual operation. It's just unsightly, AFAIK.

I guess that is true for msvc-14.1+, however for msvc-14.0 that is less clear. This appears (and I'm not clear what I'm looking at, so maybe this is just a noisy log) to cause an issue in wave. log

At the very least, this makes it annoyingly hard to see if there were other errors during the build.

Regardless of its blocking status, it would definitely be nice to get into 1.85. Is this the plan?

@grafikrobot
Copy link
Member

it doesn't block the release as the error output does not affect actual operation. It's just unsightly, AFAIK.

I guess that is true for msvc-14.1+, however for msvc-14.0 that is less clear. This appears (and I'm not clear what I'm looking at, so maybe this is just a noisy log) to cause an issue in wave. log

In that, it still completes building everything without build errors of any targets (at the end it doesn't say it failed or skipped targets).

At the very least, this makes it annoyingly hard to see if there were other errors during the build.

Right.

Regardless of its blocking status, it would definitely be nice to get into 1.85. Is this the plan?

Working on it.

@grafikrobot grafikrobot closed this Mar 3, 2024
@grafikrobot grafikrobot reopened this Mar 3, 2024
@grafikrobot grafikrobot merged commit 13b8a68 into bfgroup:main Mar 3, 2024
146 checks passed
@Lastique Lastique deleted the feature/fix_include_pattern branch March 3, 2024 21: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.

3 participants