on xenial help sign in
Enable the license check

And tweak it to skip some files And add missing licenses to some other files

commit5912f456bcd43024579932174fa2d487159170f5 authorAlbert Astals Cid <albert.astals@canonical.com> dateThu 2 Feb 2017, 17:19 (10 years ago) parent8a02dc2
16 files changed+259−4
build.sh+16 po/update-unity-pot+17 qml/Launcher/MoreAppsHeader.qml+16 qml/Stage/StageMaths.qml+16 qml/Stage/WindowInfoItem.qml+16 tests/CMakeLists.txt+1 tests/copyright/check_copyright.sh+33−4 tests/mocks/Unity/Indicators/fakeindicatorsmodeldata.js+16 tests/qmltests/ApplicationMenuDataLoader.qml+16 tests/scripts/alert-launcher-icon.sh+16 tests/scripts/get-progress.sh+16 tests/scripts/list-launcher-icons.sh+16 tests/scripts/set-count-visible.sh+16 tests/scripts/set-count.sh+16 tests/scripts/set-progress.sh+16 tools/unlock-device+16
build.sh+16
@@ -1,5 +1,21 @@
11#!/bin/sh
22
3+#
4+# Copyright (C) 2017 Canonical Ltd
5+#
6+# This program is free software: you can redistribute it and/or modify
7+# it under the terms of the GNU General Public License version 3 as
8+# published by the Free Software Foundation.
9+#
10+# This program is distributed in the hope that it will be useful,
11+# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+# GNU General Public License for more details.
14+#
15+# You should have received a copy of the GNU General Public License
16+# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+#
18+
319SETUP=false
420CLEAN=false
521NUM_JOBS=$(( `grep -c ^processor /proc/cpuinfo` + 1 ))
po/update-unity-pot+17
@@ -1,4 +1,21 @@
11#!/bin/sh
2+
3+#
4+# Copyright (C) 2017 Canonical Ltd
5+#
6+# This program is free software: you can redistribute it and/or modify
7+# it under the terms of the GNU General Public License version 3 as
8+# published by the Free Software Foundation.
9+#
10+# This program is distributed in the hope that it will be useful,
11+# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+# GNU General Public License for more details.
14+#
15+# You should have received a copy of the GNU General Public License
16+# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+#
18+
219set -e
320cd $(dirname $0)
421PO_DIR=$PWD
qml/Launcher/MoreAppsHeader.qml+16
@@ -1,3 +1,19 @@
1+/*
2+ * Copyright (C) 2017 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
117import QtQuick 2.4
218import Ubuntu.Components 1.3
319
qml/Stage/StageMaths.qml+16
@@ -1,3 +1,19 @@
1+/*
2+ * Copyright (C) 2017 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
117import QtQuick 2.4
218import Unity.Application 0.1
319import Ubuntu.Components 1.3
qml/Stage/WindowInfoItem.qml+16
@@ -1,3 +1,19 @@
1+/*
2+ * Copyright (C) 2017 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
117import QtQuick 2.4
218import Ubuntu.Components 1.3
319
tests/CMakeLists.txt+1
@@ -143,3 +143,4 @@ add_subdirectory(plugins)
143143add_subdirectory(qmltests)
144144add_subdirectory(whitespace)
145145add_subdirectory(imports)
146+add_subdirectory(copyright)
tests/copyright/check_copyright.sh+33−4
@@ -1,7 +1,7 @@
11#!/bin/sh
22
33#
4−# Copyright (C) 2013 Canonical Ltd
4+# Copyright (C) 2017 Canonical Ltd
55#
66# This program is free software: you can redistribute it and/or modify
77# it under the terms of the GNU General Public License version 3 as
@@ -15,8 +15,6 @@
1515# You should have received a copy of the GNU General Public License
1616# along with this program. If not, see <http://www.gnu.org/licenses/>.
1717#
18−# Authored by: Michi Henning <michi.henning@canonical.com>
19−#
2018
2119#
2220# Check that, somewhere in the first 30 lines of each file, the string "Copyright" (case independent) appears.
@@ -33,7 +31,38 @@ usage()
3331[ $# -lt 1 ] && usage
3432[ $# -gt 2 ] && usage
3533
36−ignore_pat="\\.sci$"
34+# image files
35+ignore_pat="\\.sci$|\\.svg$|\\.png$|\\.jpg$"
36+# git/bzr files
37+ignore_pat="$ignore_pat|/\\.bzr/|\\.bzrignore$|\\.gitignore$|/\\.bazaar/Makefile$|/\\.bzr-builddeb/default\\.conf$"
38+# info files
39+ignore_pat="$ignore_pat|/README$|/CODING$|/LGPL_EXCEPTION\\.txt$"
40+# cmake files
41+ignore_pat="$ignore_pat|/CMakeLists\\.txt$|\\.cmake$"
42+# card creator test files
43+ignore_pat="$ignore_pat|/cardcreator/.*\\.res$|/cardcreator/.*\\.res\\.cardcreator$|/cardcreator/.*\\.tst$"
44+# project files
45+ignore_pat="$ignore_pat|/\\.project$|/\\.pydevproject$|/\\.settings/|/\\.crossbuilder/"
46+# test desktop files
47+ignore_pat="$ignore_pat|/tests/.*/.*\\.desktop$"
48+# xml files
49+ignore_pat="$ignore_pat|\\.xml$"
50+# /data/ files
51+ignore_pat="$ignore_pat|/data/.*\\.conf$|/data/.*\\.in|/data/.*\\.url-dispatcher$|/data/.*\\.pkla$"
52+# polkit files
53+ignore_pat="$ignore_pat|\\.pkla$"
54+# /debian/ files
55+ignore_pat="$ignore_pat|/debian/"
56+# qmldir files
57+ignore_pat="$ignore_pat|/qmldir$"
58+# Doxygen files
59+ignore_pat="$ignore_pat|/Doxyfile.in$"
60+# Wizard license files
61+ignore_pat="$ignore_pat|/Wizard/licenses/.*\\.html$"
62+# qrc files
63+ignore_pat="$ignore_pat|\\.qrc$"
64+# the doc devices.conf file
65+ignore_pat="$ignore_pat|/doc/devices\\.conf$"
3766
3867#
3968# We don't use the -i option of licensecheck to add ignore_dir to the pattern because Jenkins creates directories
tests/mocks/Unity/Indicators/fakeindicatorsmodeldata.js+16
@@ -1,3 +1,19 @@
1+/*
2+ * Copyright (C) 2017 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
117var usageScenario = (typeof shell != 'undefined') ? shell.usageScenario : "desktop";
218
319var fakeMenuData = {
tests/qmltests/ApplicationMenuDataLoader.qml+16
@@ -1,3 +1,19 @@
1+/*
2+ * Copyright 2017 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
117import QtQuick 2.4
218import Ubuntu.Components 1.3
319import Unity.Application 0.1
tests/scripts/alert-launcher-icon.sh+16
@@ -1,3 +1,19 @@
11#!/bin/sh
22
3+#
4+# Copyright (C) 2017 Canonical Ltd
5+#
6+# This program is free software: you can redistribute it and/or modify
7+# it under the terms of the GNU General Public License version 3 as
8+# published by the Free Software Foundation.
9+#
10+# This program is distributed in the hope that it will be useful,
11+# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+# GNU General Public License for more details.
14+#
15+# You should have received a copy of the GNU General Public License
16+# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+#
18+
319qdbus com.canonical.Unity.Launcher /com/canonical/Unity/Launcher/$1 com.canonical.Unity.Launcher.Item.Alert
tests/scripts/get-progress.sh+16
@@ -1,3 +1,19 @@
11#!/bin/sh
22
3+#
4+# Copyright (C) 2017 Canonical Ltd
5+#
6+# This program is free software: you can redistribute it and/or modify
7+# it under the terms of the GNU General Public License version 3 as
8+# published by the Free Software Foundation.
9+#
10+# This program is distributed in the hope that it will be useful,
11+# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+# GNU General Public License for more details.
14+#
15+# You should have received a copy of the GNU General Public License
16+# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+#
18+
319qdbus com.canonical.Unity.Launcher /com/canonical/Unity/Launcher/$1 org.freedesktop.DBus.Properties.Get com.canonical.Unity.Launcher.Item progress
tests/scripts/list-launcher-icons.sh+16
@@ -1,3 +1,19 @@
11#!/bin/sh
22
3+#
4+# Copyright (C) 2017 Canonical Ltd
5+#
6+# This program is free software: you can redistribute it and/or modify
7+# it under the terms of the GNU General Public License version 3 as
8+# published by the Free Software Foundation.
9+#
10+# This program is distributed in the hope that it will be useful,
11+# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+# GNU General Public License for more details.
14+#
15+# You should have received a copy of the GNU General Public License
16+# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+#
18+
319qdbus com.canonical.Unity | grep Launcher | cut -f6 -d/
tests/scripts/set-count-visible.sh+16
@@ -1,3 +1,19 @@
11#!/bin/sh
22
3+#
4+# Copyright (C) 2017 Canonical Ltd
5+#
6+# This program is free software: you can redistribute it and/or modify
7+# it under the terms of the GNU General Public License version 3 as
8+# published by the Free Software Foundation.
9+#
10+# This program is distributed in the hope that it will be useful,
11+# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+# GNU General Public License for more details.
14+#
15+# You should have received a copy of the GNU General Public License
16+# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+#
18+
319qdbus com.canonical.Unity.Launcher /com/canonical/Unity/Launcher/$1 org.freedesktop.DBus.Properties.Set com.canonical.Unity.Launcher.Item countVisible $2
tests/scripts/set-count.sh+16
@@ -1,3 +1,19 @@
11#!/bin/sh
22
3+#
4+# Copyright (C) 2017 Canonical Ltd
5+#
6+# This program is free software: you can redistribute it and/or modify
7+# it under the terms of the GNU General Public License version 3 as
8+# published by the Free Software Foundation.
9+#
10+# This program is distributed in the hope that it will be useful,
11+# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+# GNU General Public License for more details.
14+#
15+# You should have received a copy of the GNU General Public License
16+# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+#
18+
319qdbus com.canonical.Unity.Launcher /com/canonical/Unity/Launcher/$1 org.freedesktop.DBus.Properties.Set com.canonical.Unity.Launcher.Item count $2
tests/scripts/set-progress.sh+16
@@ -1,3 +1,19 @@
11#!/bin/sh
22
3+#
4+# Copyright (C) 2017 Canonical Ltd
5+#
6+# This program is free software: you can redistribute it and/or modify
7+# it under the terms of the GNU General Public License version 3 as
8+# published by the Free Software Foundation.
9+#
10+# This program is distributed in the hope that it will be useful,
11+# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+# GNU General Public License for more details.
14+#
15+# You should have received a copy of the GNU General Public License
16+# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+#
18+
319qdbus com.canonical.Unity.Launcher /com/canonical/Unity/Launcher/$1 org.freedesktop.DBus.Properties.Set com.canonical.Unity.Launcher.Item progress $2
tools/unlock-device+16
@@ -1,6 +1,22 @@
11#!/bin/bash
22# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 4 -*-
33
4+#
5+# Copyright (C) 2017 Canonical Ltd
6+#
7+# This program is free software: you can redistribute it and/or modify
8+# it under the terms of the GNU General Public License version 3 as
9+# published by the Free Software Foundation.
10+#
11+# This program is distributed in the hope that it will be useful,
12+# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+# GNU General Public License for more details.
15+#
16+# You should have received a copy of the GNU General Public License
17+# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+#
19+
420# Our goal here is to get an Ubuntu Touch device into a testable unlocked state.
521# This will include a reboot.
622