Announcement

Collapse
No announcement yet.

How to ignore C/C++ reformatting - treating it as an unimportant difference?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to ignore C/C++ reformatting - treating it as an unimportant difference?

    If I have source code that is:

    fn( param1, param2, param3 );

    ... that gets reformatted to (for example):

    fn (
    param1,
    param2,
    param3 );

    Is there any way to get BC3 to treat those changes as unimportant differences?

  • #2
    No, BC3 does not currently support multi-line syntax matching. A line of code that is split between several lines on the other side of the compare will always be considered a significant difference.
    BC v4.0.7 build 19761
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

    Comment


    • #3
      Originally posted by Michael Bulgrien View Post
      No, BC3 does not currently support multi-line syntax matching. A line of code that is split between several lines on the other side of the compare will always be considered a significant difference.
      OK, thanks for the confirmation.

      Do you know if there's anything planned for this in the future, or is the core comparison so tied to lines as to make this impossible?

      Comment


      • #4
        Different methods of comparison are something we consider, but our comparison is currently line-by-line. It would be some time before a large change like that could be made.

        I would recommend an external conversion process that resorts your code, similar to our XML Tidied and Java Tidied formats.

        http://www.scootersoftware.com/downl...kb_moreformats
        Aaron P Scooter Software

        Comment


        • #5
          OK, thanks Aaron. It's not a big deal, it just would have been nice if it were easy (for the user).

          Comment


          • #6
            Dave,

            If your example (whitespace reorganization) is the extent of your reorganizing, you may want to look at the external conversion process. If you can find any 3rd party command line tools, you can configure BC to call them automatically each time that type of file is opened. If your above example were Java, then our Java Tidied rule would help.

            Let us know if you have any quesitons, or need any help setting up an external conversion.
            Aaron P Scooter Software

            Comment

            Working...
            X