New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 669941 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Presubmit always issues license check warning when touching python files on Windows

Project Member Reported by jmad...@chromium.org, Nov 30 2016

Issue description

There'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.
 

Comment 1 by kbr@chromium.org, Nov 30 2016

Cc: dpranke@chromium.org phajdan.jr@chromium.org
Components: Build Infra
CC'ing a couple of folks who've worked on the presubmit scripts. Not sure what's going on. Haven't seen that issue myself. Is this a Windows-specific problem?

Thanks Ken. Yes, this is Windows-specific.

Comment 3 by kbr@chromium.org, 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?

Components: -Infra Infra>Client>Chrome
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.
Owner: jmad...@chromium.org
Status: Started (was: Untriaged)
Thanks Dirk, we figured this to be a git setting problem. Looking at fixing this systematically with gitattributes.
Status: Fixed (was: Started)
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