Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--no-strict-license exits with 1 #69

Closed
pegasd opened this issue Jun 1, 2017 · 4 comments
Closed

--no-strict-license exits with 1 #69

pegasd opened this issue Jun 1, 2017 · 4 comments

Comments

@pegasd
Copy link
Contributor

pegasd commented Jun 1, 2017

I've been using
MetadataJsonLint.options.strict_license = false

in my Rakefile and it's been working great - Warning was being issued instead of an Error and rake metadata_lint would exit with 0, but today I found out that this behavior is broken in 1.2.1

% bundle exec rake metadata_lint
(WARN) license: License identifier Proprietary is not in the SPDX list: http://spdx.org/licenses/
Warnings found in metadata.json
% echo $?
1
@domcleal
Copy link
Contributor

domcleal commented Jun 1, 2017

Thanks for the report, I'll write a fix for it. As a side-note, the lower case string "proprietary" is accepted by metadata-json-lint as a valid licence identifier, you may want to consider changing it which will avoid the need to change the strict setting.

domcleal added a commit to domcleal/metadata-json-lint that referenced this issue Jun 1, 2017
Prior to a4bc76e, disabling strict-license would log a warning but not
exit with a failure, but now logging the warning will exit with a
failure status unless fail-on-warnings is also disabled.

This change downgrades license ID failures to warnings all of the time
(since it's a recommendation in the docs anyway) and disables them
entirely when strict-license is disabled, which better reflects what the
flag is useful for - skipping the check.

Now disabling strict-license will not cause a failure exit status and
the default behaviour is still to exit with a failure because of the
warning.

Fixes voxpupuli#69
@pegasd
Copy link
Contributor Author

pegasd commented Jun 1, 2017

Great hint, I'll start using "proprietary" from now on.

@pegasd
Copy link
Contributor Author

pegasd commented Jun 1, 2017

Also, we have a task that looks like this:

task :test do
  [:metadata_lint, :lint, :validate, :spec].each do |test|
    Rake::Task[test].invoke
  end
end

When I use "proprietary" license with the latest (1.2.1) release, the metadata_lint task exits without issuing any warnings (AND with exit code 0), but still never gets to the :lint part.

Maybe also worth testing?

@domcleal
Copy link
Contributor

domcleal commented Jun 1, 2017

I think this is issue #70, a PR is now open for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants