Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 10.1.0
    • Fix Version/s: N/A
    • Component/s: OTHER
    • Labels:
      None
    • Environment:
      linux

      Description

      The source code of the mariadb had many bad code style mesh.

      mixed with Space indent and tab indent.

      and space before or after equal sign not all them same

      i = 1;
      value= value;
      value = value;
      

      you always confused with this bad code style.

      can we tidy them ?

      or do we have andy strict code style rules?

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            netroby zhifeng hu added a comment - - edited

            And the other bad smell.

            func(arg,arg1,arg2);
            
            func(arg, arg1, arg2);
            

            some function call have space after comma, but other do not have.

            Show
            netroby zhifeng hu added a comment - - edited And the other bad smell. func(arg,arg1,arg2); func(arg, arg1, arg2); some function call have space after comma, but other do not have.
            Hide
            svoj Sergey Vojtovich added a comment -

            MySQL/MariaDB always had coding style violations for various reasons. As a rule of thumb it was agreed to enforce coding style rules only for newly written and modified code. One of good reasons was to avoid loss of "direct" RCS history. For the very same reason I'd vote to follow that rule and avoid separate coding style fixes.

            Show
            svoj Sergey Vojtovich added a comment - MySQL/MariaDB always had coding style violations for various reasons. As a rule of thumb it was agreed to enforce coding style rules only for newly written and modified code. One of good reasons was to avoid loss of "direct" RCS history. For the very same reason I'd vote to follow that rule and avoid separate coding style fixes.
            Hide
            netroby zhifeng hu added a comment -

            I thought there should be strict rules, force coding by rules or law.

            Code must clean and clear, not just ok for running.

            Running is simple, continue improve and maintain code is hard.

            Can we make life easier?

            Show
            netroby zhifeng hu added a comment - I thought there should be strict rules, force coding by rules or law. Code must clean and clear, not just ok for running. Running is simple, continue improve and maintain code is hard. Can we make life easier?
            Hide
            netroby zhifeng hu added a comment -
            Show
            netroby zhifeng hu added a comment - Now the official MySQL has it's code style guide. a big step forward. http://dev.mysql.com/doc/internals/en/assignment.html http://dev.mysql.com/doc/internals/en/coding-guidelines.html
            Hide
            elenst Elena Stepanova added a comment -

            The first link is for NDB coding guidelines, and even there it says clearly that

            When modifying and extending existing source files or modules, the coding style already used in that code should be followed in terms of indentations, naming conventions, etc.

            and

            Do not do any change to NDB code purely for the sake of changing from one formatting style to another. It just causes merge annoyances and makes patches harder to read, and we do not expect the style to ever become 100% consistent across all of the source code.

            I suppose that code reviews take care of the completely new code.

            Based on the quotes and the earlier comment by Sergey Vojtovich, closing for now as "Won't fix".

            Show
            elenst Elena Stepanova added a comment - The first link is for NDB coding guidelines, and even there it says clearly that When modifying and extending existing source files or modules, the coding style already used in that code should be followed in terms of indentations, naming conventions, etc. and Do not do any change to NDB code purely for the sake of changing from one formatting style to another. It just causes merge annoyances and makes patches harder to read, and we do not expect the style to ever become 100% consistent across all of the source code. I suppose that code reviews take care of the completely new code. Based on the quotes and the earlier comment by Sergey Vojtovich , closing for now as "Won't fix".

              People

              • Assignee:
                Unassigned
                Reporter:
                netroby zhifeng hu
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: