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

Bad linter inferences on MSVC #22

Open
1 of 4 tasks
alandefreitas opened this issue May 19, 2022 · 0 comments
Open
1 of 4 tasks

Bad linter inferences on MSVC #22

alandefreitas opened this issue May 19, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@alandefreitas
Copy link
Owner

The problem

The linter step is inferring the wrong header guards (with / instead of _) on Windows + MSVC.

Steps to Reproduce

Same usual build steps as the docs.

mkdir build
cd build
cmake .. <options> -DCMAKE_BUILD_TYPE=Release

Output

The linter steps have the following output on Windows + MSVC:

Convert guard from SMALL_DETAIL_ALGORITHM_CONSOLE_UNICODE_GUARD_HPP to SMALL\DETAIL\ALGORITHM\CONSOLE_UNICODE_GUARD_HPP
  Inferred guard SMALL\DETAIL\ALGORITHM\CONSOLE_UNICODE_GUARD_HPP is not OK
  Convert guard from SMALL_DETAIL_ALGORITHM_INTCMP_HPP to SMALL\DETAIL\ALGORITHM\INTCMP_HPP
  Inferred guard SMALL\DETAIL\ALGORITHM\INTCMP_HPP is not OK
  Convert guard from SMALL_DETAIL_ALGORITHM_LEADING_ZEROS_HPP to SMALL\DETAIL\ALGORITHM\LEADING_ZEROS_HPP
  Inferred guard SMALL\DETAIL\ALGORITHM\LEADING_ZEROS_HPP is not OK
  Convert guard from SMALL_DETAIL_ALGORITHM_SHIFT_HPP to SMALL\DETAIL\ALGORITHM\SHIFT_HPP
  Inferred guard SMALL\DETAIL\ALGORITHM\SHIFT_HPP is not OK

Platform

  • cross-platform issue - linux
  • cross-platform issue - windows
  • cross-platform issue - macos
  • other: ___________

Environment Details

  • OS: Windows
  • OS Version: 11
  • Compiler: MSVC
  • Compiler version: 19.29.30145.0

Proposed solution

Debugging and fixing.

Alternatives I've considered

No fixing it and not using the linter on MSVC

Additional context

The linter has no unit tests, so this kind of error is expected.

@alandefreitas alandefreitas added the bug Something isn't working label May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant