You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have started working on a fix, but reading the newest puppet style guide I think that the following spec test is wrong:
context 'multiline hash with opening brace on same line as first pair' do
let(:code) do
<<-END
foo { 'foo':
bar => [
{ aa => bb,
c => d},
],
}
END
end
it 'should not detect any problems' do
expect(problems).to have(0).problems
end
end
because the latest style guide declares as bad:
# hash with multiple elements on different lines, but syntax and element share a line
$myhash = { key => 'some value',
other_key => 'some other value',
}
So should a fix implement a special case handling for opening brace on the same line as first element or would be a fix acceptable that enforces that opening brace and first element on the same line is an (fixable) issue?
The text was updated successfully, but these errors were encountered:
For now, the check should be fixed in a way that maintains the behaviour in the specs. The style guide has been updated, but modifying the check behaviour will need to wait for a major version bump.
This is probably the same issue as #723 but as the error description is cut short, I can't be sure...
puppet-lint --fix test.pp
puppet-lint version: 2.3.3
ruby version: 2.3.1-p112
platform: x86_64-linux-gnu
file path: x.pp
file contents:
error:
I have started working on a fix, but reading the newest puppet style guide I think that the following spec test is wrong:
because the latest style guide declares as bad:
So should a fix implement a special case handling for opening brace on the same line as first element or would be a fix acceptable that enforces that opening brace and first element on the same line is an (fixable) issue?
The text was updated successfully, but these errors were encountered: