Author Topic: automatic header guard added despite one is already existing  (Read 2747 times)

Offline J.

  • Multiple posting newcomer
  • *
  • Posts: 47
automatic header guard added despite one is already existing
« on: April 18, 2020, 03:19:05 pm »
Since one of the March 2020 Windows nightly builds - or even earlier -, header guards are automatically added to header files, regardless if there is already one in the header body further down or not.  The example below suggests that the algorithm appears to be checking the first line only (try and open the file, then make a change in the editor ... and there is an obsolete additional header guard).

Code
/** comment */

#ifndef HEADER_H_INCLUDED
#define HEADER_H_INCLUDED

#endif // HEADER_H_INCLUDED

Can this feature be switched-off somewhere, since changing to headers of packages with, e.g., a banner before the header guard always results in unneccessary changes which is pretty annoying? Still observed in Nightly build 2020-04-18.

Thanks!

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: automatic header guard added despite one is already existing
« Reply #1 on: April 18, 2020, 03:50:50 pm »
Disable the new header guard plugin

Offline J.

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: automatic header guard added despite one is already existing
« Reply #2 on: April 19, 2020, 09:53:17 am »
Great - that works!  Happy to switch the plugin on again, when it is able to cope with already existing guards.

Many thanks, Miguel!