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

More Chefstyle updates #8711

Merged
merged 18 commits into from
Jul 8, 2019
Merged

More Chefstyle updates #8711

merged 18 commits into from
Jul 8, 2019

Conversation

lamont-granquist
Copy link
Contributor

@lamont-granquist lamont-granquist commented Jul 2, 2019

This should probably be reviewed only after #8708 goes in (or doesn't).

Associated chefstyle PR with the updates: chef/chefstyle#74

i like this one, gives visual priority to returns or raises that are
buried in the middle of things.

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
start enforcing using %i{} instead of arrays of symbols

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
zero args methods don't get parens.

this certainly reads better than the inverse.

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Layout/MultilineMethodCallIndentation:
  Enabled: true
  EnforcedStyle: indented

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Lint/BlockAlignment:
  Enabled: true
  EnforcedStyleAlignWith: start_of_block

this works better with Layout/MultilineMethodCallIndentation to
force indentation of multiline method calls that wind up with multiline
blocks.

i'd probably pull back the end to match with the start of the expression
but this gets the indentation level inside the block correct.

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
given how many regexps we have with /'s in the match this seems like
a very good one.

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
convert kind_of? to is_a?

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
since we use double quotes, be consistent everywhere.

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
enforce pretzels.

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
- Layout/MultilineMethodCallBraceLayout
- Layout/ClosingParenthesisIndentation
- Layout/IndentFirstArgument
  EnforcedStyle: consistent
- Layout/BlockEndNewline

the first of these autocorrected to horrible looking code which exposed
that we really needed the other three as well, which also cleaned up a
bunch of other terrible looking code.

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
exposed by Style/SymbolProc mangling some bad code.

no idea how this ever worked.

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
@lamont-granquist
Copy link
Contributor Author

lamont-granquist commented Jul 8, 2019

found one.

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
@lamont-granquist lamont-granquist merged commit cfdd852 into master Jul 8, 2019
@lamont-granquist lamont-granquist deleted the lcg/new-chefstyle2 branch July 8, 2019 23:47
@lock
Copy link

lock bot commented Jul 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant