voxpupuli / metadata-json-lint

Tool to check the validity of Puppet metadata.json files
Apache License 2.0
29 stars 27 forks source link

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

Closed pegasd closed 7 years ago

pegasd commented 7 years ago

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 commented 7 years ago

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.

pegasd commented 7 years ago

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

pegasd commented 7 years ago

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 commented 7 years ago

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