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

BA2004 - Should exclude "AssemblyAttributes.obj" #974

Closed
shaopeng-gh opened this issue Nov 21, 2023 · 1 comment
Closed

BA2004 - Should exclude "AssemblyAttributes.obj" #974

shaopeng-gh opened this issue Nov 21, 2023 · 1 comment

Comments

@shaopeng-gh
Copy link
Collaborator

shaopeng-gh commented Nov 21, 2023

This issue has been reported by different users.
The previous assumption was using the latest VS 2022 created project will not have this issue.
However, we now can repro on the official template with latest VS 2022. the /ZH:SHA_256 can be seen in the raw command line but it does not get applied, or applied but the hash type flag is not set correctly.
So this "AssemblyAttributes.obj" is unreliable to check, we should exclude this together with "pch.obj" when checking binary.

The raw command line:

image
image

This is created using this template and can easily repro:

image

Also, if pass /ZH:SHA1, these two will still have hash type none, while we can report correctly other files are SHA1.

So the compiler did honor the flag expect a few files. We should skip checking those files.
The known ones are:
AssemblyAttributes.obj
AssemblyInfo.obj
pch.obj

@shaopeng-gh shaopeng-gh changed the title BA2004 - Should exclude "AssemblyAttributes.obj" in BA2004 BA2004 - Should exclude "AssemblyAttributes.obj" Nov 21, 2023
@shaopeng-gh
Copy link
Collaborator Author

The linked PR should resolved this issue, closing.

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

No branches or pull requests

1 participant