-
Notifications
You must be signed in to change notification settings - Fork 18
Create a new plugin for ensuring a single space before a '=>' #175
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
Conversation
Hi, are you aware of https://rubygems.org/gems/puppet-lint-strict_indent-check ? It also checks the alignment |
0207c1f
to
d4cdfad
Compare
Yes, I do have that installed but it wasn't catching this situation. |
a53c2f2
to
b472b54
Compare
spec/unit/puppet-lint/plugins/check_whitespace/space_before_arrow_spec.rb
Outdated
Show resolved
Hide resolved
spec/unit/puppet-lint/plugins/check_whitespace/space_before_arrow_spec.rb
Outdated
Show resolved
Hide resolved
@gerases apologies for the such late response.. I've left a couple of comments above. Could you address those and we can try get this moving? |
@jordanbreen28 , ah, good point -- just changed and pushed -- is that better? |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #175 +/- ##
==========================================
+ Coverage 93.15% 93.19% +0.03%
==========================================
Files 54 55 +1
Lines 1768 1792 +24
==========================================
+ Hits 1647 1670 +23
- Misses 121 122 +1 ☔ View full report in Codecov by Sentry. |
spec/unit/puppet-lint/plugins/check_whitespace/space_before_arrow_spec.rb
Outdated
Show resolved
Hide resolved
# bar => 'baz', | ||
# } | ||
# | ||
# is handled by the "arrow_alignment") plugin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the )
looks a bit odd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, fixed
2210858
to
c0426cd
Compare
@gerases could you sign the CLA? I've tested this locally and all works like a charm :) |
I think I did but it's still saying pending? |
@gerases ah! its been known to do this. |
re-opening |
Looks like this is the issue cla-assistant/cla-assistant#562 (comment) |
6df6783
to
8640cb3
Compare
okeedok, working on this right now |
0d7b8f9
to
8640cb3
Compare
Hmm, i can't seem to do anything here, should close the PR and create a new one? |
@gerases It looks like you're commits are authored by a different email/user than your PR was created with (which is probably what you used to sign the CLA) 😃 |
This will trigger a warning only for resources with single parameters such as: ``` file { 'foo': ensure⎵⎵=> file, } ```
1407256
to
5bee2bc
Compare
Yeah, needed to rewrite the commits, should be good now |
@bastelfreak, can you approve |
Thanks for your contribution @gerases 😁 |
@jordanbreen28 , happy to contribute! Thank you all as well! |
This will trigger a warning only for resources with single parameters such as:
Summary
Create a new plugin for ensuring a single space before a '=>' in resources with a single parameter. Arrow alignment for resources with multiple parameters (including detecting extra white space before the arrow) is already done in the arrow_alignment plugin.
Checklist