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

Disable warning in clang-tidy #2477

Open
maharvey opened this issue Mar 6, 2020 · 0 comments
Open

Disable warning in clang-tidy #2477

maharvey opened this issue Mar 6, 2020 · 0 comments

Comments

@maharvey
Copy link

maharvey commented Mar 6, 2020

Expected behavior

Disable an annoying clang-tidy warning on linux

Steps to reproduce

  1. Create a source file containing strncpy()
  2. Observe that neomake complains
  3. There is no way to disable this warning globally

In this case I would need to pass --checks=-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling to clang-tidy

Adding this as args for the c maker gets rid of the warning:

function! neomake#makers#ft#c#clangtidy() abort
    return {
        \ 'exe': 'clang-tidy',
        \ 'args': ['--checks=-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling'],
        \ 'errorformat':
etc...

It would be nice if there was a way to set this in .vimrc

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