Giter Site home page Giter Site logo

hirevo / epitech-c-cpp-headers Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 9.0 212 KB

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

License: MIT License

TypeScript 100.00%
c cpp epitech vscode vscode-extension

epitech-c-cpp-headers's People

Contributors

c0florent avatar colcolty avatar dependabot-preview[bot] avatar dependabot[bot] avatar enzo-cesaretti avatar fanfan54old avatar hirevo avatar ichiidev avatar lodi-g avatar qin-07 avatar rmaxi-me avatar sashimy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

epitech-c-cpp-headers's Issues

Add Makefile header support for `.mk` files

Usually, Makefiles are named literally "Makefile", "makefile", or "GNUmakefile". But in the case where you have parts of a Makefile contained in a separate file, the convention is to use the .mk file extension.

.mk files are recognised by the coding style checker as Makefiles and reports "missing header" style errors in these files, but the extension doesn't recognise them as Makefiles and can't automatically add a header to the file.

I think the fix can be made quite easily by changing how files are detected as Makefile or not

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

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...

Tracking issue: Code refactorings

This is a tracking issue for the refactors that will happen for the extension.

I think the code style is pretty poor at the moment.
Some things to fix includes:

  • Some things are inconsistent (like double quotes vs single quotes)
  • Some code could be written to be more terse, more readable and more maintanable than it currently is.
  • The filenames are confusing, I don't even know why I did it this way.
  • Explore the current idiomatic way to do file edits in VSCode (is there new/better APIs to use ?)

2017

The header displays "2018" instead of "2017"

Toggle opening curly brackets style in autogenerated classes

It would be a fine feature to choose which style of opening curly brackets should be applied in autogenerated C++ classes. I personally prefer to place them in the next line after class name (like in C#) but since it generates code with brace in same line with class name (like in Java), every time I generate class body, I am made to do it manually.
Adnotacja 2020-03-29 205737Adnotacja 2020-03-29 210056

Extension issue

  • Issue Type: Bug
  • Extension Name: epitech-c-cpp-headers
  • Extension Version: 1.13.0
  • OS Version: Windows_NT x64 10.0.18363
  • VSCode version: 1.41.1

⚠️ We have written the needed data into your clipboard. Please paste! ⚠️

Support for remote development

Problem statement

Visual Studio Code Insider supports remote development (kind of a vscode server), and with it, extensions installed server-side rather than client-side.
Some APIs will work for both without changes but maybe we are using an API for which this is not the case, so we need to investigate.

To-do

  • Investigate if there exists issues with remote development.
  • Fix these issues (if any).

Bug with header description when generated from the filename

Description

When leaving the description field blank, if the filename contains the same characters as the file extension, it cuts the filename in an unexpected way.

Examples

Example 1

File name: particle_manager.c

/*
** EPITECH PROJECT, 2018
** project
** File description:
** partile_manager.
*/

Expected result:

/*
** EPITECH PROJECT, 2018
** project
** File description:
** particle_manager
*/

Example 2

File name: this_is_a_test.h

/*
** EPITECH PROJECT, 2018
** project
** File description:
** tis_is_a_test.
*/

Expected result:

/*
** EPITECH PROJECT, 2018
** project
** File description:
** this_is_a_test
*/

Example 3

File name: this_cpp_file.cpp

/*
** EPITECH PROJECT, 2018
** project
** File description:
** this__file.cp
*/

Expected result:

/*
** EPITECH PROJECT, 2018
** project
** File description:
** this_cpp_file
*/

Update coding style.

Since the coding style as been updated, there is some changes like no more tabulations but spaces.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.