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

Make the compile time parameter error clearer #358

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def has_invalid_values?
end

def create_error
"#{@name} cannot contain empty parameters:#{@parameter.inspect}"
"#{@name} is not present inside the 'compile_time_parameters' entry, or has an empty value; found: #{@parameter.inspect}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should inform that it's a parameter that's missing. Can sort of infer it from the compile_time_parameters name, but better to be explicit.

end

end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe '#validate' do
let(:name) { 'name' }
let(:error_message) { -> (error, _definition) { "#{name} cannot contain empty parameters:#{error.inspect}" } }
let(:error_message) { -> (error, _definition) { "#{name} is not present inside the 'compile_time_parameters' entry, or has an empty value; found: #{error.inspect}" } }

context 'string validation' do
let(:definition) { {type: :string} }
Expand Down