: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: )
Atom is throwing some error on the given snippet as i tried to beautfy.
Input Before Beautification
This is what the code looked like before:
#include "stdio.h" int main(int argc, char const *argv[]) {
a = 1;b = 2;
c = a +b;return 0;}
Expected Output
The beautified code should have looked like this:
#include "stdio.h"
int main(int argc, char const *argv[]) {
a = 1;
b = 2;
c = a + b;
return 0;
}
Actual Output
The beautified code actually looked like this:
#include "stdio.h" int main(int argc, char const *argv[]) {
a = 1;b = 2;
c = a +b;return 0;}
Steps to Reproduce
Add code to Atom editor
Run command Atom Beautify: Beautify Language C
OR Run command Atom Beautify: Beautify Language C++
This beautified code does not look right!
Error Code
Error: Parsing: input2020010-9295-fd8lzy.ya2yb.c as language C
Unmatched BRACE_CLOSE
at orig_line=3, orig_col=19
Try the option 'tok_split_gte = true'
at /root/.atom/packages/atom-beautify/src/beautifiers/executable.coffee:183:23
at tryCatcher (/root/.atom/packages/atom-beautify/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/root/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/root/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/root/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/root/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/root/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/root/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:102:5)
at Async.drainQueues (/root/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:15:14)
at process._tickCallback (internal/process/next_tick.js:68:7)
Checklist
I have:
[x] Tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
[x] Reloaded (or restarted) Atom to ensure it is not a caching issue
[x] Filled out the Input, Expected, and Actual sections above or have edited/removed them in a way that fully describes the issue.
[x] Generated debugging information by executing Atom Beautify: Help Debug Editor command in Atom and added link for debug.md Gist to this issue
# Atom Beautify - Debugging information
The following debugging information was generated by `Atom Beautify` on `Fri Jan 10 2020 16:54:08 GMT+0530 (India Standard Time)`.
---
## Table Of Contents
- [Versions](#versions)
- [Original file to be beautified](#original-file-to-be-beautified)
- [Original File Contents](#original-file-contents)
- [Package Settings](#package-settings)
- [Beautification options](#beautification-options)
- [Final Options](#final-options)
- [Results](#results)
- [Logs](#logs)
---
**Platform**: linux
## Versions
**Atom Version**: 1.42.0
**Atom Beautify Version**: 0.33.4
## Original file to be beautified
**Original File Path**: `/home/user/Documents/dask_project/new.c`
**Original File Grammar**: C
**Original File Language**: C
**Language namespace**: c
**Supported Beautifiers**: Uncrustify, clang-format
**Selected Beautifier**: Uncrustify
### Original File Contents
```c
#include "stdio.h" int main(int argc, char const *argv[]) {
a = 1;b = 2;
c = a +b;return 0;}
Description
Atom is throwing some error on the given snippet as i tried to beautfy.
Input Before Beautification
This is what the code looked like before:
Expected Output
The beautified code should have looked like this:
Actual Output
The beautified code actually looked like this:
Steps to Reproduce
Atom Beautify: Beautify Language C
Atom Beautify: Beautify Language C++
Error Code
Error: Parsing: input2020010-9295-fd8lzy.ya2yb.c as language C Unmatched BRACE_CLOSE at orig_line=3, orig_col=19 Try the option 'tok_split_gte = true' at /root/.atom/packages/atom-beautify/src/beautifiers/executable.coffee:183:23 at tryCatcher (/root/.atom/packages/atom-beautify/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/root/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/root/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/root/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/root/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:729:18) at _drainQueueStep (/root/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:93:12) at _drainQueue (/root/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:86:9) at Async._drainQueues (/root/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:102:5) at Async.drainQueues (/root/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:15:14) at process._tickCallback (internal/process/next_tick.js:68:7)
Checklist
I have:
[x] Tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
[x] Reloaded (or restarted) Atom to ensure it is not a caching issue
[x] Searched through existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues so I know this is not a duplicate issue
[x] Filled out the Input, Expected, and Actual sections above or have edited/removed them in a way that fully describes the issue.
[x] Generated debugging information by executing
Atom Beautify: Help Debug Editor
command in Atom and added link fordebug.md
Gist to this issuePackage Settings
The raw package settings options
Beautification options
Editor Options: Options from Atom Editor settings
Config Options: Options from Atom Beautify package settings
Home Options: Options from
/root/.jsbeautifyrc
EditorConfig Options: Options from EditorConfig file
Project Options: Options from
.jsbeautifyrc
files starting from directory/home/user/Documents/dask_project
and going up to rootPackage Settings
The raw package settings options
Beautification options
Editor Options: Options from Atom Editor settings
Config Options: Options from Atom Beautify package settings
Home Options: Options from
/root/.jsbeautifyrc
EditorConfig Options: Options from EditorConfig file
Project Options: Options from
.jsbeautifyrc
files starting from directory/home/user/Documents/dask_project
and going up to rootPre-Transformed Options: Combined options before transforming them given a beautifier's specifications
Final Options
Final combined and transformed options that are used
Results
Beautified File Contents:
]
Final Options
Final combined and transformed options that are used
Results
Beautified File Contents: