Go 1.19 includes some changes to gofmt which intend to make lists and
heading clearer when rendered (https://go.dev/doc/go1.19). This commit
is the result of running the new gofmt and manually fixing some of it.
This was necessary because the new gofmt assumed lines beginning w/ tabs
to start lists or examples. While this is often true in our codebase,
we occasionally also use tabs to indent the lines after a TODO or FIXME
prefix or in yaml (e.g., excerpts of a snap.yaml). This meant that a lot of the
reformatted comments were broken and had to be fixed manually.
Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
* Group 3rd party imports
* Remove unused vars
* Move var only used in tests into test
* Add 'nolint' to ignore warning on unused iotas (might've been
left to improve readability).
Some licenses were missing. Update to the latest version of the SPDX license
list.
Fixes: https://bugs.launchpad.net/snapcraft/+bug/1903609
* spdx: add deprecated license IDs
Some deprecated license IDs may be in common use, eg. GPL-2.0, GPL-3.0.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
* spdx: drop implicit handling of 'or-later' licenses
Some licenses had 'or-later' variants, eg. GPL-2.0+. The code would incorrectly
treat such licenses and lics as 'gnuplot+' would validate correctly even though
it is unexpected.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
* spdx: add a test case for GPL-2.0++ license
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
* spdx: update to 3.11 2020-11-25 version of license list data
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
This license is not part of spdx and was only added for backward
compatibility. But given that we will use "unset" for unknown
licenses the backward compatibility is not required.