Hirevo / epitech-c-cpp-headers

An EPITECH header handler for C/C++ projects in Visual Studio Code

Home Page:https://marketplace.visualstudio.com/items?itemName=nicolaspolomack.epitech-c-cpp-headers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tabulations used to indent #define (with auto-insertion of header define guards)

fanfan54old opened this issue · comments

Hi,
I think I found a (small) issue with the auto-insertion of header define guards.

If :

  • epitech-c-cpp-headers.headerType is set to post2017
  • epitech-c-cpp-headers.usePragmaOnce is disabled

Then, when inserting the header in a C/C++ header file, the extension will use tabulation to indent the #define
image
...but it should use 4 spaces.
image

There is no indentation problem with the pre2017 coding style.

I'm going to push a pull request...

Hello,

To begin, thank you for reporting this issue and making the pull request.

Despite knowing that the coding style changed, I completely forgot that tabs were still being inserted.
In third year, we don't get C projects anymore so I guess it's why I didn't noticed it.
I hope it didn't cause any trouble for other people's projects.

I'll go review the pull request. :)