Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 2.8.0
-
None
-
9d3f12f24f9e02102a0c4e166f7b6f2885d08580
Description
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.