Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-cli
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Operations
Operations
Metrics
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-cli
Commits
15a5e88f
Unverified
Commit
15a5e88f
authored
May 26, 2023
by
Alessio Perugini
Committed by
GitHub
May 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[skip changelog] Automate license headers checks in CI (#2177)
parent
b0d8ff84
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
160 additions
and
0 deletions
+160
-0
.github/workflows/check-go-task.yml
.github/workflows/check-go-task.yml
+35
-0
Taskfile.yml
Taskfile.yml
+6
-0
arduino/discovery/testdata/cat/main.go
arduino/discovery/testdata/cat/main.go
+15
-0
commands/lib/search_test.go
commands/lib/search_test.go
+15
-0
commands/sketch/new_test.go
commands/sketch/new_test.go
+15
-0
configuration/configuration_schema_test.go
configuration/configuration_schema_test.go
+15
-0
executils/testdata/delay/main.go
executils/testdata/delay/main.go
+15
-0
i18n/cmd/po/merge_test.go
i18n/cmd/po/merge_test.go
+15
-0
internal/cli/arguments/completion.go
internal/cli/arguments/completion.go
+15
-0
license_header.tpl
license_header.tpl
+14
-0
No files found.
.github/workflows/check-go-task.yml
View file @
15a5e88f
...
...
@@ -219,6 +219,41 @@ jobs:
-
name
:
Check whether any tidying was needed
run
:
git diff --color --exit-code
check-license-headers
:
name
:
check-license-headers (${{ matrix.module.path }})
needs
:
run-determination
if
:
needs.run-determination.outputs.result == 'true'
runs-on
:
ubuntu-latest
strategy
:
fail-fast
:
false
matrix
:
module
:
-
path
:
./
steps
:
-
name
:
Checkout repository
uses
:
actions/checkout@v3
-
name
:
Install Go
uses
:
actions/setup-go@v4
with
:
go-version
:
${{ env.GO_VERSION }}
-
name
:
Install Task
uses
:
arduino/setup-task@v1
with
:
repo-token
:
${{ secrets.GITHUB_TOKEN }}
version
:
3.x
-
name
:
Check for missing license headers
env
:
GO_MODULE_PATH
:
${{ matrix.module.path }}
run
:
|
task go:add-license-headers
git diff --color --exit-code
# Do a simple "smoke test" build for the modules with no other form of validation
build
:
name
:
build (${{ matrix.module.path }})
...
...
Taskfile.yml
View file @
15a5e88f
...
...
@@ -142,6 +142,12 @@ tasks:
-
easyjson arduino/cores/packageindex/index.go
-
easyjson arduino/libraries/librariesindex/json.go
go:add-license-headers:
desc
:
Add missing go license headers
cmds
:
-
go install github.com/google/addlicense@v1.1.1
-
addlicense -c "ARDUINO SA (http://www.arduino.cc/)" -f ./license_header.tpl **/*.go
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown-task/Taskfile.yml
markdown:check-links:
desc
:
Check for broken links
...
...
arduino/discovery/testdata/cat/main.go
View file @
15a5e88f
// This file is part of arduino-cli.
//
// Copyright 2023 ARDUINO SA (http://www.arduino.cc/)
//
// This software is released under the GNU General Public License version 3,
// which covers the main part of arduino-cli.
// The terms of this license can be found at:
// https://www.gnu.org/licenses/gpl-3.0.en.html
//
// You can be released from the requirements of the above licenses by purchasing
// a commercial license. Buying such a license is mandatory if you want to
// modify or otherwise use the software for commercial activities involving the
// Arduino software without disclosing the source code of your own applications.
// To purchase a commercial license, send an email to license@arduino.cc.
// Echo stdin to stdout.
// This program is used for testing purposes, to make it available on all
// OS a tool equivalent to UNIX "cat".
...
...
commands/lib/search_test.go
View file @
15a5e88f
// This file is part of arduino-cli.
//
// Copyright 2023 ARDUINO SA (http://www.arduino.cc/)
//
// This software is released under the GNU General Public License version 3,
// which covers the main part of arduino-cli.
// The terms of this license can be found at:
// https://www.gnu.org/licenses/gpl-3.0.en.html
//
// You can be released from the requirements of the above licenses by purchasing
// a commercial license. Buying such a license is mandatory if you want to
// modify or otherwise use the software for commercial activities involving the
// Arduino software without disclosing the source code of your own applications.
// To purchase a commercial license, send an email to license@arduino.cc.
package
lib
import
(
...
...
commands/sketch/new_test.go
View file @
15a5e88f
// This file is part of arduino-cli.
//
// Copyright 2023 ARDUINO SA (http://www.arduino.cc/)
//
// This software is released under the GNU General Public License version 3,
// which covers the main part of arduino-cli.
// The terms of this license can be found at:
// https://www.gnu.org/licenses/gpl-3.0.en.html
//
// You can be released from the requirements of the above licenses by purchasing
// a commercial license. Buying such a license is mandatory if you want to
// modify or otherwise use the software for commercial activities involving the
// Arduino software without disclosing the source code of your own applications.
// To purchase a commercial license, send an email to license@arduino.cc.
package
sketch
import
(
...
...
configuration/configuration_schema_test.go
View file @
15a5e88f
// This file is part of arduino-cli.
//
// Copyright 2023 ARDUINO SA (http://www.arduino.cc/)
//
// This software is released under the GNU General Public License version 3,
// which covers the main part of arduino-cli.
// The terms of this license can be found at:
// https://www.gnu.org/licenses/gpl-3.0.en.html
//
// You can be released from the requirements of the above licenses by purchasing
// a commercial license. Buying such a license is mandatory if you want to
// modify or otherwise use the software for commercial activities involving the
// Arduino software without disclosing the source code of your own applications.
// To purchase a commercial license, send an email to license@arduino.cc.
package
configuration
import
(
...
...
executils/testdata/delay/main.go
View file @
15a5e88f
// This file is part of arduino-cli.
//
// Copyright 2023 ARDUINO SA (http://www.arduino.cc/)
//
// This software is released under the GNU General Public License version 3,
// which covers the main part of arduino-cli.
// The terms of this license can be found at:
// https://www.gnu.org/licenses/gpl-3.0.en.html
//
// You can be released from the requirements of the above licenses by purchasing
// a commercial license. Buying such a license is mandatory if you want to
// modify or otherwise use the software for commercial activities involving the
// Arduino software without disclosing the source code of your own applications.
// To purchase a commercial license, send an email to license@arduino.cc.
package
main
import
(
...
...
i18n/cmd/po/merge_test.go
View file @
15a5e88f
// This file is part of arduino-cli.
//
// Copyright 2023 ARDUINO SA (http://www.arduino.cc/)
//
// This software is released under the GNU General Public License version 3,
// which covers the main part of arduino-cli.
// The terms of this license can be found at:
// https://www.gnu.org/licenses/gpl-3.0.en.html
//
// You can be released from the requirements of the above licenses by purchasing
// a commercial license. Buying such a license is mandatory if you want to
// modify or otherwise use the software for commercial activities involving the
// Arduino software without disclosing the source code of your own applications.
// To purchase a commercial license, send an email to license@arduino.cc.
package
po
import
(
...
...
internal/cli/arguments/completion.go
View file @
15a5e88f
// This file is part of arduino-cli.
//
// Copyright 2023 ARDUINO SA (http://www.arduino.cc/)
//
// This software is released under the GNU General Public License version 3,
// which covers the main part of arduino-cli.
// The terms of this license can be found at:
// https://www.gnu.org/licenses/gpl-3.0.en.html
//
// You can be released from the requirements of the above licenses by purchasing
// a commercial license. Buying such a license is mandatory if you want to
// modify or otherwise use the software for commercial activities involving the
// Arduino software without disclosing the source code of your own applications.
// To purchase a commercial license, send an email to license@arduino.cc.
package
arguments
import
(
...
...
license_header.tpl
0 → 100644
View file @
15a5e88f
This file is part of arduino-cli.
Copyright{{ if .Year }} {{.Year}}{{ end }} {{.Holder}}
This software is released under the GNU General Public License version 3,
which covers the main part of arduino-cli.
The terms of this license can be found at:
https://www.gnu.org/licenses/gpl-3.0.en.html
You can be released from the requirements of the above licenses by purchasing
a commercial license. Buying such a license is mandatory if you want to
modify or otherwise use the software for commercial activities involving the
Arduino software without disclosing the source code of your own applications.
To purchase a commercial license, send an email to license@arduino.cc.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment