Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-9833

Empty lines in license file add trailing whitespace

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • Qt Creator 2.8.1
    • Qt Creator 2.8.0
    • Editors
    • None
    • 9d3f12f24f9e02102a0c4e166f7b6f2885d08580

      I use a license file that contains a c-style comment:

      "Example License"
      /******************************************************************************
      
        This source file is part of the MyProject project.
      
        Copyright 2013 Me
      
        This source code is released under the New BSD License, (the "License").
      
        Unless required by applicable law or agreed to in writing, software
        distributed under the License is distributed on an "AS IS" BASIS,
        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        See the License for the specific language governing permissions and
        limitations under the License.
      
      ******************************************************************************/
      

      Trouble is, each empty line in the template is padded with space characters to meet the current indention level for the comment block. Many of the projects I work on reject commits with trailing whitespace/whitespace-only lines, so I have to go back and remove the added characters.

      I see two possible ways to fix this:

      1) Disable formatting of the license file text. Just enter it as written (except for replacements), leaving formatting as-is in the file.

      2) Mark the inserted license lines as modified when the new document is created. This will allow the "clean trailing whitespace on save" option to fix these lines up automatically.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            davschul David Schulz
            dlonie David Lonie
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes