Skip to content

Commit

Permalink
Add missing license headers
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 4, 2018
1 parent 23c3731 commit 1395dc0
Show file tree
Hide file tree
Showing 10 changed files with 111 additions and 3 deletions.
20 changes: 20 additions & 0 deletions python/core/additions/qgsfeature.py
@@ -1,3 +1,23 @@
# -*- coding: utf-8 -*-

"""
***************************************************************************
qgsfeature.py
---------------------
Date : May 2018
Copyright : (C) 2018 by Denis Rouzaud
Email : denis@opengis.ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
"""


def mapping_feature(feature):
geom = feature.geometry()
fields = [field.name() for field in feature.fields()]
Expand Down
2 changes: 2 additions & 0 deletions python/core/auto_generated/geometry/qgslinesegment.sip.in
Expand Up @@ -8,6 +8,8 @@





class QgsLineSegment2D
{
%Docstring
Expand Down
11 changes: 11 additions & 0 deletions python/plugins/processing/script/ScriptTemplate.py
@@ -1,5 +1,16 @@
# -*- coding: utf-8 -*-

"""
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
"""

from PyQt5.QtCore import QCoreApplication
from qgis.core import (QgsProcessing,
QgsFeatureSink,
Expand Down
9 changes: 9 additions & 0 deletions src/core/geometry/qgslinesegment.cpp
Expand Up @@ -6,6 +6,15 @@
email : nyall dot dawson at gmail dot com
***************************************************************************/

/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/

#include "qgslinesegment.h"
#include "qgsgeometryutils.h"

Expand Down
10 changes: 10 additions & 0 deletions src/core/geometry/qgslinesegment.h
Expand Up @@ -5,6 +5,16 @@
copyright : (C) 2018 by Nyall Dawson
email : nyall dot dawson at gmail dot com
***************************************************************************/

/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/

#ifndef QGSLINESEGMENT_H
#define QGSLINESEGMENT_H

Expand Down
14 changes: 14 additions & 0 deletions src/providers/postgres/qgspostgresprojectstorage.cpp
@@ -1,3 +1,17 @@
/***************************************************************************
qgspostgresprojectstorage.cpp
---------------------
begin : April 2018
copyright : (C) 2018 by Martin Dobias
email : wonder dot sk at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "qgspostgresprojectstorage.h"

#include "qgspostgresconn.h"
Expand Down
14 changes: 14 additions & 0 deletions src/providers/postgres/qgspostgresprojectstorage.h
@@ -1,3 +1,17 @@
/***************************************************************************
qgspostgresprojectstorage.h
---------------------
begin : April 2018
copyright : (C) 2018 by Martin Dobias
email : wonder dot sk at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSPOSTGRESPROJECTSTORAGE_H
#define QGSPOSTGRESPROJECTSTORAGE_H

Expand Down
14 changes: 14 additions & 0 deletions src/providers/postgres/qgspostgresprojectstoragedialog.cpp
@@ -1,3 +1,17 @@
/***************************************************************************
qgspostgresprojectstoragedialog.cpp
---------------------
begin : April 2018
copyright : (C) 2018 by Martin Dobias
email : wonder dot sk at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "qgspostgresprojectstoragedialog.h"

#include "qgspostgresconn.h"
Expand Down
14 changes: 14 additions & 0 deletions src/providers/postgres/qgspostgresprojectstoragedialog.h
@@ -1,3 +1,17 @@
/***************************************************************************
qgspostgresprojectstoragedialog.h
---------------------
begin : April 2018
copyright : (C) 2018 by Martin Dobias
email : wonder dot sk at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSPOSTGRESPROJECTSTORAGEDIALOG_H
#define QGSPOSTGRESPROJECTSTORAGEDIALOG_H

Expand Down
6 changes: 3 additions & 3 deletions tests/code_layout/test_licenses.sh
Expand Up @@ -3,15 +3,15 @@
# This test checks that all source files correctly have license headers

INCLUDE_EXTENSIONS="h|cpp|hpp|py|c"
EXCLUDE_LIST="(.*\\/(qtermwidget)\\/|ui_defaults\\.h|CREDITS|TODO|README|URI|^[^.]*$|.*\\.(?!($INCLUDE_EXTENSIONS)$))"
EXCLUDE_LIST="(.*\\/(qtermwidget)\\/|.*\\/(auto_additions)\\/|ui_defaults\\.h|qgspluginmanager_texts\\.cpp|src\\/analysis\\/vector\\/mersenne-twister\\.|^[^.]*$|.*\\.(?!($INCLUDE_EXTENSIONS)$))"
LICENSE_CHECK="external/licensecheck/licensecheck.pl"

DIR=$(git rev-parse --show-toplevel)

pushd "${DIR}" || exit > /dev/null
pushd "${DIR}" > /dev/null || exit
missing=$(! { "$LICENSE_CHECK" -r -i "$EXCLUDE_LIST" src & "$LICENSE_CHECK" -r -i "$EXCLUDE_LIST" python; } | grep UNKNOWN)

popd || exit > /dev/null
popd > /dev/null || exit

if [[ $missing ]]; then
echo " *** Found source files without valid license headers"
Expand Down

0 comments on commit 1395dc0

Please sign in to comment.