Presubmit always issues license check warning when touching python files on Windows |
||||
Issue descriptionThere's some line ending regex that needs fixing here but I'm not sure how to find the right code. Any time I modify python files, most often generate_buildbot_json.py ** Presubmit Warnings ** License must match: .*? Copyright (\(c\) )?(2016|2015|2014|2013|2012|2011|2010|2009|2008|2007|2006|2006-2008|2006-2009|2006-2010) The Chromium Authors\. All rights reserved\.\n.*? Use of this source code is governed by a BSD-style license that can be\n.*? found in the LICENSE file\.(?: \*/)?\n Found a bad license header in these files: content\test\gpu\generate_buildbot_json.py Presubmit checks took 20.5s to calculate. This is the top of the file: #!/usr/bin/env python # Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. This looks correct me. Maybe a line endings problem? Cc'ing a few random people who might know an owner for this. I'm not even sure what Components to label.
,
Nov 30 2016
Thanks Ken. Yes, this is Windows-specific.
,
Nov 30 2016
That file uses Unix line endings. Have you made sure your git checkout and text editor are configured correctly to not replace them with DOS style line endings?
,
Nov 30 2016
,
Nov 30 2016
I'm pretty sure I've double checked this several times with Nodepad++ and dox2unix and still the problem persists. Could be something to do with git attributes and CRLF auto-conversion on checkout or upload.
,
Dec 8 2016
Thanks Dirk, we figured this to be a git setting problem. Looking at fixing this systematically with gitattributes.
,
Dec 13 2016
This landed in https://codereview.chromium.org/2558413002/. Not sure why the CL didn't get updated in here. |
||||
►
Sign in to add a comment |
||||
Comment 1 by kbr@chromium.org
, Nov 30 2016Components: Build Infra