Glavin001 / atom-beautify

:mega: Help Wanted - Looking for Maintainer: https://github.com/Glavin001/atom-beautify/issues/2572 | :lipstick: Universal beautification package for Atom editor (:warning: Currently migrating to https://github.com/Unibeautify/ and have very limited bandwidth for Atom-Beautify Issues. Thank you for your patience and understanding :heart: )
http://unibeautify.com/
MIT License
1.49k stars 453 forks source link

Detect C++14 as C++ #1210

Open biffen opened 8 years ago

biffen commented 8 years ago

Description

The language-cpp14 package provides a grammar called ‘C++14’. When a C++ header file is open and set to C++14, running the beautifier causes Uncrustify to assume the file is C, rather than C++. Uncrustify then often fails because there are non-C things in the file.

Expected Results

A file set to C++14 results in Uncrustify treating it as C++.

Steps to Reproduce

  1. Install language-cpp14.
  2. Open a C++ header file.
  3. Set the language to C++14 (if not set already).
  4. Run the atom-beautify.

    Debug

Checklist

prettydiff commented 8 years ago

@biffen I opened a bug with the uncrustify project. I am not very familiar with uncrustify and they are asking for more information. Would you mind hopping into https://github.com/uncrustify/uncrustify/issues/763#issuecomment-248305327 and responding?

Glavin001 commented 8 years ago

Please add a link to the required debug.md Gist which includes debugging information that answers our most commonly asked questions: https://github.com/Glavin001/atom-beautify/blob/master/ISSUE_TEMPLATE.md#how-to-create-debugmd-gist Thank you.

Glavin001 commented 8 years ago

Based on your issue description what needs to be done is add the C++14 grammar to the C++ language within Atom-Beautify: https://github.com/Glavin001/atom-beautify/blob/master/src/languages/cpp.coffee#L10 However, the debug.md is required to confirm this.

If this is the issue then please submit a Pull Request changing the grammar list for C++. See https://github.com/Glavin001/atom-beautify/blob/master/docs/add-languages-and-beautifiers.md and other past Pull Requests for more information. Let us know if you have any questions.

biffen commented 8 years ago

@prettydiff I respectfully disagree. This is simply what @Glavin001 mentions; adding the C++14 grammar to atom-beautify.

@Glavin001 How do I create a debug.md (the template doesn't say)? And is it really necessary? You seem to have a solution already.

prettydiff commented 8 years ago

@biffen https://github.com/Glavin001/atom-beautify/blob/master/docs/troubleshooting.md

Glavin001 commented 8 years ago

Thanks @prettydiff . That is the correct link. It appears my GitHub saved reply is outdated.

How do I create a debug.md (the template doesn't say)? And is it really necessary? You seem to have a solution already.

In the future please include a debug.md Gist which will provide answers to common questions we ask. However, this sounds like a simple missing grammar for the C++ language file within Atom-Beautify. You can submit a Pull Request after you confirm the recommended fix works for you. Thanks!