I'm thinking "config.h" needs to be included before any of the kicad
header files. I'm not terribly thrilled about alphabetizing the
include
files per clang-format and we certainly shouldn't be using it in this
case. I always grouped them according to where they are defined even
though it's not strictly necessary. It gave a nice bread crumb trail
as
to where you might find said header file. This probably would not be
strictly necessary if we always verified header files did not have any
unmet dependencies per the coding policy[1].
[1]:
https://docs.kicad-pcb.org/doxygen/md_Documentation_development_coding-style-policy.html#header_depends
On 1/21/20 2:06 PM, Simon Richter wrote:
Hi,
we have a build failure on MSVC because ngspice.cpp no longer includes
<config.h>. This file should really be included first by any cpp file,
because it uses macros to work around compiler differences.
The format checker rightly suggests that, as it is a <> include from
the
local project, it should go after the ** includes. Can we somehow
special-case this?
In the long run, we probably want to have a <stdafx.h> or similar file
per project, which lists all the external includes, and is precompiled
before the rest of the project, this would have the same constraint,
but
as a hard requirement (i.e. we get compiler errors if the include
isn't
the first non-comment in the file).
What would be required to adjust the format checker?
Simon
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help : https://help.launchpad.net/ListHelp
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help : https://help.launchpad.net/ListHelp