Bug 194588 - [Indenter] Indentation on parenthesses
Summary: [Indenter] Indentation on parenthesses
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 4.0   Edit
Hardware: All Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-27 06:52 EDT by Spyrus CLA
Modified: 2020-09-04 15:26 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Spyrus CLA 2007-06-27 06:52:54 EDT
The else if statement is a keyword and should have the rules
 of if/else in indentation.Make indentation rules work on if/else also.

1) Indent the following snipset => else if statement second line wrong
identation :

if ((currentCardPolled.temperatureCurrent > cardConfig.temperatureHigh ||
    currentCardPolled.temperatureCurrent < cardConfig.temperatureLow) &&
    !unitOverheatAlarmExists)
{
  sendAlarm(Alarm_BBS10_Unit_Overheat);
  unitOverheatAlarmExists=true;
}
else if (currentCardPolled.temperatureCurrent <= cardConfig.temperatureHigh && 
   -> currentCardPolled.temperatureCurrent >= cardConfig.temperatureLow  &&
    unitOverheatAlarmExists)
{
  sendPotClear(Alarm_BBS10_Unit_Overheat);
  unitOverheatAlarmExists=false;


This is a macro with double parentheses. There must be a way to
indenting on different parentheses levels just like the brackets are handled.

The snipset:

LOG ((ERR,
    "BO_BMS_IBAS_i::downloadAttributes()-> OID=%s -> Send Configuration
Event...",
    (const char*) marker()));