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

C/C++-cppcheck: Add support for multiple --std= arguments and add support for --suppress= arguments #960

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@fredmorcos
Contributor

fredmorcos commented May 9, 2016

The two commit messages contain descriptions. Let me know if I should clarify anything.

The first commit changes the -cppcheck-language-standard to -cppcheck-standards and to support multiple --std= arguments.

The second commit adds the -cppcheck-suppressions to support zero or more --suppression= arguments.

@lunaryorn

This comment has been minimized.

Contributor

lunaryorn commented May 9, 2016

@fredmorcos Thank you very much. I'll take a look soon.

@fredmorcos

This comment has been minimized.

Contributor

fredmorcos commented May 18, 2016

@lunaryorn ping!

.. option:: flycheck-cppcheck-suppressions
The cppcheck suppressions list to use via one or more
``--suppress=``.

This comment has been minimized.

@lunaryorn

lunaryorn May 18, 2016

Contributor

Is there are particular reason why you have two spaces between each word here?

This comment has been minimized.

@fredmorcos

fredmorcos May 19, 2016

Contributor

This is just emacs' fill-paragraph (M-q), should I change that?

This comment has been minimized.

@lunaryorn

lunaryorn May 19, 2016

Contributor

@fredmorcos Oh, indeed?! My M-q doesn't insert double-spaces after every word 😕 What setting did you change to achieve this effect? I've never seen this behaviour before.

But in any case, yes, please change that. While we use double-spacing at sentence end in line with Emacs' default settings, we definitely don't put two spaces after every single word.

This comment has been minimized.

@fredmorcos

fredmorcos May 19, 2016

Contributor

I have default-justification set to 'full, that is why. Will fix it here.

This comment has been minimized.

@lunaryorn

lunaryorn May 19, 2016

Contributor

@fredmorcos Oh, I didn't even know that this setting existed 😳

There's not a day on which I don't learn a new thing about Emacs 😊

This comment has been minimized.

@fredmorcos

fredmorcos May 19, 2016

Contributor

Hehe... true... I have it set up this way because I write my notes in emacs, and paragraphs in text files look a lot better this way when both the left and right sides are aligned.

flycheck.el Outdated
(string :tag "Suppression")))
:safe #'flycheck-string-list-p
:package-version '(flycheck . "27"))
(make-variable-buffer-local 'flycheck-cppcheck-suppressions)

This comment has been minimized.

@lunaryorn

lunaryorn May 18, 2016

Contributor

Please do not make this variable local, i.e. remove this line.

This comment has been minimized.

@fredmorcos

fredmorcos May 19, 2016

Contributor

Both make-variable-buffer-local lines should be removed then, no? (make-variable-buffer-local 'flycheck-cppcheck-standards) and (make-variable-buffer-local 'flycheck-cppcheck-suppressions)

This comment has been minimized.

@lunaryorn

lunaryorn May 19, 2016

Contributor

No, only the latter, please The language standard is inherently a local setting.

@lunaryorn

This comment has been minimized.

Contributor

lunaryorn commented May 18, 2016

@fredmorcos Looks good, expect for some minor issues. Would you mind to take a look?

fredmorcos added some commits May 9, 2016

c/c++-cppcheck: Add support for multiple --std= arguments
Previously it  was only possible to  pass a single --std=  argument to
cppcheck.  It  turns  out   that  cppcheck  supports  multiple  --std=
arguments (ie,  --std=posix --std=c99),  which cannot  be passed  in a
comma separated  list. This  change adds  support for  multiple --std=
arguments  by making  the emacs  variable either  a nil  or a  list of
strings.

This      change     also      renames      the     variable      from
`-cppcheck-language-standard` to `-cppcheck-standards` since these are
not strictly language standards anymore.
c/c++-cppcheck: Add support for cppcheck's --suppression= argument
This  adds support  for passing  cppcheck zero  or more  --suppresion=
arguments  that may  be useful  to  suppress specific  cases. This  is
achieved by adding an emacs variable that is either a nil or a list of
strings.
@fredmorcos

This comment has been minimized.

Contributor

fredmorcos commented May 19, 2016

Should be okay now... Really hope I didn't mess anything up while updating the commits...

lunaryorn added a commit that referenced this pull request May 19, 2016

Add support for multiple --std= arguments
Previously it was only possible to pass a single --std= argument to
cppcheck.  It turns out that cppcheck supports multiple --std=
arguments (ie, --std=posix --std=c99), which cannot be passed in a comma
separated list. This change adds support for multiple --std= arguments
by making the emacs variable either a nil or a list of strings.

This change also renames the variable from `-cppcheck-language-standard`
to `-cppcheck-standards` since these are not strictly language standards
anymore.

See GH-960

@lunaryorn lunaryorn closed this in e2ddce5 May 19, 2016

@lunaryorn lunaryorn removed the S-blocked label May 19, 2016

@lunaryorn

This comment has been minimized.

Contributor

lunaryorn commented May 19, 2016

@fredmorcos Merged, thank you very much for this contribution 👍 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment