license_finder 6.8.0 → 6.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/CONTRIBUTING.md +5 -4
- data/Dockerfile +19 -4
- data/README.md +26 -11
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/ci/pipelines/pull-request.yml.erb +2 -0
- data/ci/pipelines/release.yml.erb +2 -0
- data/ci/tasks/rubocop.yml +2 -0
- data/ci/tasks/update-changelog.yml +2 -0
- data/examples/Gemfile +4 -0
- data/examples/custom_erb_template.rb +24 -0
- data/examples/extract_license_data.rb +63 -0
- data/examples/sample_template.erb +7 -0
- data/lib/license_finder/cli/base.rb +8 -1
- data/lib/license_finder/cli/main.rb +5 -1
- data/lib/license_finder/configuration.rb +12 -0
- data/lib/license_finder/core.rb +5 -2
- data/lib/license_finder/decisions.rb +9 -4
- data/lib/license_finder/license.rb +11 -4
- data/lib/license_finder/license/text.rb +2 -2
- data/lib/license_finder/package.rb +1 -0
- data/lib/license_finder/package_manager.rb +10 -5
- data/lib/license_finder/package_managers/composer.rb +8 -4
- data/lib/license_finder/package_managers/conda.rb +131 -0
- data/lib/license_finder/package_managers/erlangmk.rb +14 -7
- data/lib/license_finder/package_managers/go_dep.rb +15 -8
- data/lib/license_finder/package_managers/go_modules.rb +3 -1
- data/lib/license_finder/package_managers/npm.rb +1 -1
- data/lib/license_finder/package_managers/yarn.rb +1 -1
- data/lib/license_finder/packages/conda_package.rb +74 -0
- data/lib/license_finder/packages/erlangmk_package.rb +13 -6
- data/lib/license_finder/report.rb +1 -0
- data/lib/license_finder/reports/junit_report.rb +19 -0
- data/lib/license_finder/reports/templates/junit_report.erb +41 -0
- data/lib/license_finder/scanner.rb +25 -2
- data/license_finder.gemspec +2 -1
- metadata +35 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73b9ecbd4718f26feaf025ecfe39dc87d3a68538fb5a63118cc7970940930fa2
|
4
|
+
data.tar.gz: 4b7544aef7f9c5a312c2bc58fb277217109f4cc6095a65d252e738a3705a54f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b51e18d0be7d5b25e62b52fbd4a046ab0a7cdba9ea865210172a4026b63e4c2b566446de40bccf45b331580f9de25ed05f620e1b2ccbb6c182162347f0f8b653
|
7
|
+
data.tar.gz: 58ab33ffa3395bf495fd5b392a89a2fa40d6f1c36228241df10b28534357f76d6cc6ab663a2e0c859684c75a69d4464f6dcd4dc5d8f69e30e84add4589506d0f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
# [6.10.1] / 2021-01-08
|
2
|
+
|
3
|
+
# [6.10.0] / 2020-11-27
|
4
|
+
|
5
|
+
# [6.9.0] / 2020-10-05
|
6
|
+
|
7
|
+
### Changed
|
8
|
+
* to recognize permitted licenses with AND in the name [#173997648] - [eab14250](https://github.com/pivotal/LicenseFinder/commit/eab14250d188153f8c2b0b5c0191fec19bcddf55) - Raymond Lee
|
9
|
+
|
10
|
+
# [6.8.2] / 2020-09-08
|
11
|
+
|
12
|
+
# [6.8.1] / 2020-08-13
|
13
|
+
|
1
14
|
# [6.8.0] / 2020-08-06
|
2
15
|
|
3
16
|
# [6.7.0] / 2020-07-23
|
@@ -909,3 +922,8 @@ Bugfixes:
|
|
909
922
|
[6.6.2]: https://github.com/pivotal/LicenseFinder/compare/v6.6.1...v6.6.2
|
910
923
|
[6.7.0]: https://github.com/pivotal/LicenseFinder/compare/v6.6.2...v6.7.0
|
911
924
|
[6.8.0]: https://github.com/pivotal/LicenseFinder/compare/v6.7.0...v6.8.0
|
925
|
+
[6.8.1]: https://github.com/pivotal/LicenseFinder/compare/v6.8.0...v6.8.1
|
926
|
+
[6.8.2]: https://github.com/pivotal/LicenseFinder/compare/v6.8.1...v6.8.2
|
927
|
+
[6.9.0]: https://github.com/pivotal/LicenseFinder/compare/v6.8.2...v6.9.0
|
928
|
+
[6.10.0]: https://github.com/pivotal/LicenseFinder/compare/v6.9.0...v6.10.0
|
929
|
+
[6.10.1]: https://github.com/pivotal/LicenseFinder/compare/v6.10.0...v6.10.1
|
data/CONTRIBUTING.md
CHANGED
@@ -24,8 +24,8 @@ will use the gem version installed inside the docker image.
|
|
24
24
|
|
25
25
|
## Useful Tips
|
26
26
|
|
27
|
-
To build the docker image simply call `docker build .` or explicitly pass the `Dockerfile`. Prebuilt versions of the
|
28
|
-
dockerfile can also be found on [Dockerhub](https://hub.docker.com/r/licensefinder/license_finder/tags/).
|
27
|
+
To build the docker image simply call `docker build .` or explicitly pass the `Dockerfile`. Prebuilt versions of the
|
28
|
+
dockerfile can also be found on [Dockerhub](https://hub.docker.com/r/licensefinder/license_finder/tags/).
|
29
29
|
|
30
30
|
To launch the docker image and interact with it via bash:
|
31
31
|
```
|
@@ -60,13 +60,13 @@ submitting a pull request which adds new columns to
|
|
60
60
|
`lib/license_finder/reports/csv_report.rb`.
|
61
61
|
|
62
62
|
It is also possible to generate a custom report from an ERB template. Use this
|
63
|
-
[example](https://
|
63
|
+
[example](https://github.com/pivotal/LicenseFinder/blob/master/examples/custom_erb_template.rb) as a starting
|
64
64
|
point. These reports will have access to the helpers in
|
65
65
|
[`LicenseFinder::ErbReport`](https://github.com/pivotal/LicenseFinder/blob/master/lib/license_finder/reports/erb_report.rb).
|
66
66
|
|
67
67
|
If you need a report with more detailed data or in a different format, we
|
68
68
|
recommend writing a custom ruby script. This
|
69
|
-
[example](https://
|
69
|
+
[example](https://github.com/pivotal/LicenseFinder/blob/master/examples/extract_license_data.rb) will get you
|
70
70
|
started.
|
71
71
|
|
72
72
|
If you come up with something useful, consider posting it to the Google Group
|
@@ -91,6 +91,7 @@ To successfully run the test suite, you will need the following installed:
|
|
91
91
|
- Conan
|
92
92
|
- NuGet
|
93
93
|
- dotnet
|
94
|
+
- Conda (requires python)
|
94
95
|
|
95
96
|
The [LicenseFinder docker image](https://hub.docker.com/r/licensefinder/license_finder/) already contains these dependencies.
|
96
97
|
|
data/Dockerfile
CHANGED
@@ -2,7 +2,7 @@ FROM ubuntu:xenial
|
|
2
2
|
|
3
3
|
# Versioning
|
4
4
|
ENV PIP_INSTALL_VERSION 19.0.2
|
5
|
-
ENV PIP3_INSTALL_VERSION
|
5
|
+
ENV PIP3_INSTALL_VERSION 20.0.2
|
6
6
|
ENV GO_LANG_VERSION 1.14.3
|
7
7
|
ENV MAVEN_VERSION 3.6.0
|
8
8
|
ENV SBT_VERSION 1.3.3
|
@@ -55,8 +55,8 @@ RUN curl -o rebar3 https://s3.amazonaws.com/rebar3/rebar3 && \
|
|
55
55
|
|
56
56
|
# install and update python and python-pip
|
57
57
|
RUN apt-get install -y python python-pip python3-pip && \
|
58
|
-
|
59
|
-
|
58
|
+
python3 -m pip install pip==$PIP3_INSTALL_VERSION --upgrade && \
|
59
|
+
python -m pip install pip==$PIP_INSTALL_VERSION --upgrade --force
|
60
60
|
|
61
61
|
# install maven
|
62
62
|
RUN curl -O https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz && \
|
@@ -154,16 +154,31 @@ RUN wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsof
|
|
154
154
|
sudo apt-get update &&\
|
155
155
|
sudo apt-get install -y dotnet-runtime-2.1 dotnet-sdk-2.1 dotnet-sdk-2.2 dotnet-sdk-3.0 dotnet-sdk-3.1
|
156
156
|
|
157
|
+
# install Composer
|
157
158
|
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 4F4EA0AAE5267A6C &&\
|
158
159
|
echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/php.list &&\
|
159
160
|
apt-get update &&\
|
160
161
|
apt-get install -y php7.4-cli &&\
|
162
|
+
EXPECTED_COMPOSER_INSTALLER_CHECKSUM="$(curl --silent https://composer.github.io/installer.sig)" &&\
|
161
163
|
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" &&\
|
162
|
-
php -r "
|
164
|
+
ACTUAL_COMPOSER_INSTALLER_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" &&\
|
165
|
+
test "${ACTUAL_COMPOSER_INSTALLER_CHECKSUM}" = "${EXPECTED_COMPOSER_INSTALLER_CHECKSUM}" || (echo "ERROR: Invalid installer checksum" >&2; false) &&\
|
163
166
|
php composer-setup.php &&\
|
164
167
|
php -r "unlink('composer-setup.php');" &&\
|
165
168
|
mv composer.phar /usr/bin/composer
|
166
169
|
|
170
|
+
# install miniconda
|
171
|
+
# See https://docs.conda.io/en/latest/miniconda_hashes.html
|
172
|
+
# for latest versions and SHAs.
|
173
|
+
WORKDIR /tmp
|
174
|
+
RUN \
|
175
|
+
conda_installer=Miniconda3-py38_4.9.2-Linux-x86_64.sh &&\
|
176
|
+
ref='1314b90489f154602fd794accfc90446111514a5a72fe1f71ab83e07de9504a7' &&\
|
177
|
+
wget -q https://repo.anaconda.com/miniconda/${conda_installer} &&\
|
178
|
+
sha=`openssl sha256 "${conda_installer}" | cut -d' ' -f2` &&\
|
179
|
+
([ "$sha" = "${ref}" ] || (echo "Verification failed: ${sha} != ${ref}"; false)) &&\
|
180
|
+
(echo; echo "yes") | sh "${conda_installer}"
|
181
|
+
|
167
182
|
# install license_finder
|
168
183
|
COPY . /LicenseFinder
|
169
184
|
RUN bash -lc "cd /LicenseFinder && bundle config set no-cache 'true' && bundle install -j4 && rake install"
|
data/README.md
CHANGED
@@ -54,6 +54,7 @@ and give you an actionable exception report.
|
|
54
54
|
* Rust (via `cargo`)
|
55
55
|
* Go Modules (via `go mod`)
|
56
56
|
* PHP (via `composer`)
|
57
|
+
* Python (via Conda [Conda 4.8.3, Python 3.7, Bash; requires an `environment.yml` or `environment.yaml`])
|
57
58
|
|
58
59
|
## Installation
|
59
60
|
|
@@ -121,9 +122,9 @@ be useful when you need to track down an unexpected package or
|
|
121
122
|
license.
|
122
123
|
|
123
124
|
If you do not want to manually run an individual package manager's prepare
|
124
|
-
command (ex: `bundle install`, `npm install`, etc) to ensure your project
|
125
|
+
command (ex: `bundle install`, `npm install`, etc) to ensure your project
|
125
126
|
is fully prepared to be scanned, use the `--prepare` or `-p` option which will run
|
126
|
-
each active package manager's prepare command for you. If you would like to continue
|
127
|
+
each active package manager's prepare command for you. If you would like to continue
|
127
128
|
running `license_finder` even if there is an issue with a prepare step, use the
|
128
129
|
`--prepare-no-fail` option which prepares but carries on despite any potential failures.
|
129
130
|
|
@@ -135,7 +136,7 @@ command.
|
|
135
136
|
|
136
137
|
If you have docker installed, try using the included `dlf` script (potentially
|
137
138
|
symlinked to be in your path via `ln -s LicenseFinder/dlf /usr/local/bin` or
|
138
|
-
whatever method you prefer). This will run any
|
139
|
+
whatever method you prefer). This will run any commands passed to it inside a
|
139
140
|
pre-provisioned Docker container to maintain consistent versions of all the
|
140
141
|
package managers. For example,
|
141
142
|
|
@@ -156,10 +157,10 @@ You can better understand the way this script works by looking at its source, bu
|
|
156
157
|
reference it will mount your current directory at the path `/scan` and run any commands
|
157
158
|
passed to it from that directory.
|
158
159
|
|
159
|
-
Note that the docker image will run the gem which is installed within it.
|
160
|
+
Note that the docker image will run the gem which is installed within it.
|
160
161
|
So the docker image tagged `4.0.2` will run *License Finder Version 4.0.2*
|
161
162
|
|
162
|
-
See the [
|
163
|
+
See the [contributing guide](https://github.com/pivotal/LicenseFinder/blob/master/CONTRIBUTING.md) for information on development.
|
163
164
|
|
164
165
|
### Activation
|
165
166
|
|
@@ -310,7 +311,7 @@ be approved. The project name at the top of the report can be set with
|
|
310
311
|
`license_finder project_name add`.
|
311
312
|
|
312
313
|
### Note:
|
313
|
-
When using the yarn package manager, when a node_module's package.json doesn't
|
314
|
+
When using the yarn package manager, when a node_module's package.json doesn't
|
314
315
|
explicitly declare a license, yarn indicates that it has inferred the license based
|
315
316
|
on some keywords in other files by appending an asterisk to the license name. If you
|
316
317
|
see a * at the end of the license name, this is intended.
|
@@ -332,7 +333,7 @@ $ license_finder licenses add my_unknown_dependency MIT --homepage="www.unknown-
|
|
332
333
|
```
|
333
334
|
|
334
335
|
This command would assign the MIT license to the dependency
|
335
|
-
`my_unknown_dependency`. It will also set its homepage to `
|
336
|
+
`my_unknown_dependency`. It will also set its homepage to `www.unknown-code.org`.
|
336
337
|
|
337
338
|
|
338
339
|
### Adding Hidden Dependencies
|
@@ -420,6 +421,15 @@ If you store rebar dependencies in a custom directory (by setting `deps_dir` in
|
|
420
421
|
You can also invoke a custom Mix script `remix` with `--mix_command remix` and
|
421
422
|
set `--mix_deps_dir` to fetch Mix dependencies from a custom directory.
|
422
423
|
|
424
|
+
### Narrow down Package Manager
|
425
|
+
|
426
|
+
By default, license_finder will check for all supported package managers,
|
427
|
+
but you can narrow it down to use only those you pass to `--enabled-package-managers`.
|
428
|
+
For example,
|
429
|
+
|
430
|
+
```
|
431
|
+
$ license_finder --enabled-package-managers bundler npm
|
432
|
+
```
|
423
433
|
|
424
434
|
### Saving Configuration
|
425
435
|
|
@@ -437,6 +447,11 @@ rebar_command: './rebarw'
|
|
437
447
|
rebar_deps_dir: './rebar_deps'
|
438
448
|
mix_command: './mixw'
|
439
449
|
mix_deps_dir: './mix_deps'
|
450
|
+
enabled_package_managers:
|
451
|
+
- bundler
|
452
|
+
- gradle
|
453
|
+
- rebar
|
454
|
+
- mix
|
440
455
|
```
|
441
456
|
|
442
457
|
### Gradle Projects
|
@@ -461,9 +476,9 @@ downloadLicenses {
|
|
461
476
|
### Conan Projects
|
462
477
|
|
463
478
|
`license_finder` supports Conan. You need to have the following lines in your conanfile.txt for `license_finder` to retrieve dependencies' licenses.
|
464
|
-
Ensure that `conan install` does not generate an error.
|
479
|
+
Ensure that `conan install` does not generate an error.
|
465
480
|
|
466
|
-
```
|
481
|
+
```
|
467
482
|
[imports]
|
468
483
|
., license* -> ./licenses @ folder=True, ignore_case=True
|
469
484
|
```
|
@@ -517,9 +532,9 @@ And save a `LICENSE` file which contains your license text in your repo.
|
|
517
532
|
|
518
533
|
* Bundler
|
519
534
|
* When using `--project-path`, Bundler cannot find the Gemfile.
|
520
|
-
|
535
|
+
|
521
536
|
* Yarn
|
522
|
-
* A module that is incompatible with the platform on which
|
537
|
+
* A module that is incompatible with the platform on which
|
523
538
|
license_finder is run will always be reported to have a license type
|
524
539
|
of "unknown". ([#456](https://github.com/pivotal/LicenseFinder/issues/456))
|
525
540
|
|
data/Rakefile
CHANGED
@@ -54,7 +54,7 @@ task :update_pipeline, [:slack_url, :slack_channel] do |_, args|
|
|
54
54
|
puts 'Warning: You should provide slack channel and url to receive slack notifications on build failures'
|
55
55
|
end
|
56
56
|
|
57
|
-
ruby_versions = %w[2.7.1 2.6.5 2.5.7 2.4.9 2.3.8
|
57
|
+
ruby_versions = %w[2.7.1 2.6.5 2.5.7 2.4.9 2.3.8]
|
58
58
|
|
59
59
|
params = []
|
60
60
|
params << "ruby_versions=#{ruby_versions.join(',')}"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
6.
|
1
|
+
6.10.1
|
data/ci/tasks/rubocop.yml
CHANGED
data/examples/Gemfile
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'rubygems'
|
6
|
+
require 'bundler/setup'
|
7
|
+
|
8
|
+
# This is an example of how to programatically generate a report using a custom
|
9
|
+
# ERB template. Run with
|
10
|
+
# > bundle install
|
11
|
+
# > ./custom_erb_template.rb
|
12
|
+
|
13
|
+
require 'license_finder'
|
14
|
+
|
15
|
+
# See lib/license_finder/core.rb for more configuration options.
|
16
|
+
# A quiet logger is required when running reports...
|
17
|
+
lf = LicenseFinder::Core.new(LicenseFinder::Configuration.with_optional_saved_config(logger: :quiet))
|
18
|
+
|
19
|
+
# Find many more examples of complex ERB templates in
|
20
|
+
# lib/license_finder/reports/templates/
|
21
|
+
template = Pathname.new('./sample_template.erb')
|
22
|
+
print LicenseFinder::ErbReport
|
23
|
+
.new(lf.acknowledged, project_name: lf.project_name)
|
24
|
+
.to_s(template)
|
@@ -0,0 +1,63 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'rubygems'
|
6
|
+
require 'bundler/setup'
|
7
|
+
|
8
|
+
# This is an example of how to programatically extract the information that
|
9
|
+
# LicenseFinder has about packages and their licenses.
|
10
|
+
# > bundle install
|
11
|
+
# > ./extract_license_data.rb
|
12
|
+
|
13
|
+
require 'license_finder'
|
14
|
+
|
15
|
+
# See lib/license_finder/core.rb for more configuration options.
|
16
|
+
# A quiet logger is required when running reports...
|
17
|
+
lf = LicenseFinder::Core.new(LicenseFinder::Configuration.with_optional_saved_config(logger: :quiet))
|
18
|
+
|
19
|
+
# Groups of packages
|
20
|
+
lf.acknowledged # All (non-ignored) packages license_finder is tracking
|
21
|
+
lf.unapproved # The packages which have not been approved or permitted
|
22
|
+
lf.restricted # The packages which have been restricted
|
23
|
+
|
24
|
+
# Package details
|
25
|
+
lf.acknowledged.each do |package|
|
26
|
+
# Approvals
|
27
|
+
package.approved? # Whether the package has been approved manually or permitted
|
28
|
+
package.approved_manually?
|
29
|
+
package.permitted?
|
30
|
+
package.restricted?
|
31
|
+
|
32
|
+
# Licensing
|
33
|
+
# The set of licenses, each of which has a name and url, which
|
34
|
+
# license_finder will report for this package.
|
35
|
+
package.licenses
|
36
|
+
# Additional information about how these licenses were chosen
|
37
|
+
# (from decision, from spec, from files, or none-found). See
|
38
|
+
# LicenseFinder::Licensing and LicenseFinder::Activation
|
39
|
+
package.activations
|
40
|
+
# The files that look like licenses, found in the package's
|
41
|
+
# directory. Caveat: if a package's licenses were specified by a decision or
|
42
|
+
# by the package's spec, the license_files will be ignored. That means,
|
43
|
+
# package.licenses may report different licenses than those found in
|
44
|
+
# license_files.
|
45
|
+
package.license_files
|
46
|
+
package.license_files.each do |file|
|
47
|
+
# The license found in this file.
|
48
|
+
file.license
|
49
|
+
# The text of the file. Sometimes this will be an entire README file,
|
50
|
+
# because license_finder has found the phrase "is released under the
|
51
|
+
# MIT license" in it.
|
52
|
+
file.text
|
53
|
+
end
|
54
|
+
package.licensing.activations_from_decisions # If license_finder only knew about decisions, what licenses would it report?
|
55
|
+
package.licensing.activations_from_spec # If license_finder only knew about package specs, what licenses would it report?
|
56
|
+
package.licensing.activations_from_files # If license_finder only knew about package files, what licenses would it report?
|
57
|
+
package.licensing.activations_from_files.each do |activation|
|
58
|
+
# Each activation groups together all files that point to the same license.
|
59
|
+
# Each file contains its #license and #text.
|
60
|
+
activation.license
|
61
|
+
activation.files
|
62
|
+
end
|
63
|
+
end
|
@@ -11,6 +11,10 @@ module LicenseFinder
|
|
11
11
|
desc: 'Where decisions are saved. Defaults to doc/dependency_decisions.yml.'
|
12
12
|
class_option :log_directory,
|
13
13
|
desc: 'Where logs are saved. Defaults to ./lf_logs/$PROJECT/prepare_$PACKAGE_MANAGER.log'
|
14
|
+
class_option :enabled_package_managers,
|
15
|
+
desc: 'List of package managers to be enabled. Defaults to all supported package managers.',
|
16
|
+
type: :array,
|
17
|
+
enum: LicenseFinder::Scanner.supported_package_manager_ids
|
14
18
|
|
15
19
|
no_commands do
|
16
20
|
def decisions
|
@@ -32,6 +36,7 @@ module LicenseFinder
|
|
32
36
|
extract_options(
|
33
37
|
:project_path,
|
34
38
|
:decisions_file,
|
39
|
+
:enabled_package_managers,
|
35
40
|
:go_full_version,
|
36
41
|
:gradle_command,
|
37
42
|
:gradle_include_groups,
|
@@ -53,7 +58,9 @@ module LicenseFinder
|
|
53
58
|
:columns,
|
54
59
|
:aggregate_paths,
|
55
60
|
:recursive,
|
56
|
-
:sbt_include_groups
|
61
|
+
:sbt_include_groups,
|
62
|
+
:conda_bash_setup_script,
|
63
|
+
:composer_check_require_only
|
57
64
|
).merge(
|
58
65
|
logger: logger_mode
|
59
66
|
)
|
@@ -19,7 +19,8 @@ module LicenseFinder
|
|
19
19
|
'markdown' => MarkdownReport,
|
20
20
|
'csv' => CsvReport,
|
21
21
|
'xml' => XmlReport,
|
22
|
-
'json' => JsonReport
|
22
|
+
'json' => JsonReport,
|
23
|
+
'junit' => JunitReport
|
23
24
|
}.freeze
|
24
25
|
|
25
26
|
class_option :go_full_version, desc: 'Whether dependency version should include full version. Only meaningful if used with a Go project. Defaults to false.'
|
@@ -37,6 +38,9 @@ module LicenseFinder
|
|
37
38
|
class_option :mix_command, desc: "Command to use when fetching packages through Mix. Only meaningful if used with a Mix project (i.e., Elixir or Erlang). Defaults to 'mix'."
|
38
39
|
class_option :mix_deps_dir, desc: "Path to Mix dependencies directory. Only meaningful if used with a Mix project (i.e., Elixir or Erlang). Defaults to 'deps'."
|
39
40
|
class_option :sbt_include_groups, desc: 'Whether dependency name should include group id. Only meaningful if used with a Scala/sbt project. Defaults to false.'
|
41
|
+
class_option :conda_bash_setup_script, desc: "Path to conda.sh script. Only meaningful if used with a Conda project. Defaults to '~/miniconda3/etc/profile.d/conda.sh'."
|
42
|
+
class_option :composer_check_require_only,
|
43
|
+
desc: "Whether to only check for licenses from dependencies on the 'require' section. Only meaningful if used with a Composer project. Defaults to false."
|
40
44
|
|
41
45
|
# Method options which are shared between report and action_item
|
42
46
|
def self.format_option
|
@@ -65,6 +65,10 @@ module LicenseFinder
|
|
65
65
|
Pathname(path_prefix).expand_path
|
66
66
|
end
|
67
67
|
|
68
|
+
def enabled_package_manager_ids
|
69
|
+
get(:enabled_package_managers)
|
70
|
+
end
|
71
|
+
|
68
72
|
def logger_mode
|
69
73
|
get(:logger)
|
70
74
|
end
|
@@ -93,6 +97,10 @@ module LicenseFinder
|
|
93
97
|
get(:pip_requirements_path)
|
94
98
|
end
|
95
99
|
|
100
|
+
def conda_bash_setup_script
|
101
|
+
get(:conda_bash_setup_script)
|
102
|
+
end
|
103
|
+
|
96
104
|
def python_version
|
97
105
|
get(:python_version)
|
98
106
|
end
|
@@ -137,6 +145,10 @@ module LicenseFinder
|
|
137
145
|
get(:sbt_include_groups)
|
138
146
|
end
|
139
147
|
|
148
|
+
def composer_check_require_only
|
149
|
+
get(:composer_check_require_only)
|
150
|
+
end
|
151
|
+
|
140
152
|
attr_writer :strict_matching
|
141
153
|
|
142
154
|
attr_reader :strict_matching
|