Bug 487625 - Code formatter messes up with scientific numbers depending on previous code
Summary: Code formatter messes up with scientific numbers depending on previous code
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 8.8.0   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-10 15:28 EST by Daniel Jb CLA
Modified: 2020-09-04 15:26 EDT (History)
3 users (show)

See Also:


Attachments
formatter settings and code example (20.50 KB, application/x-tar)
2016-02-10 15:28 EST, Daniel Jb CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Jb CLA 2016-02-10 15:28:32 EST
Created attachment 259695 [details]
formatter settings and code example

The integrated code formatter changes scientific numbers like
  
  return 1.0e-3;

into

    return 1.0
  e-3

when using a custom formatter (settings attached)

This error depends on the code prior to this line (various dependencies), see attached file.
Comment 1 Jonah Graham CLA 2016-02-10 16:04:56 EST
Note that this mis-formatting actually introduces a syntax error in the code where there was none before making it a more significant error than "typical" formatting errors.

This started out over on stackoverflow http://stackoverflow.com/q/35243092/2796832