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

feat: Add option to ignore lines before indentation change #152

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

j-d-ha
Copy link

@j-d-ha j-d-ha commented Oct 13, 2024

Added ignore-indent-change flag. When this flag is used, the line lengths of lines preceding an indentation change are ignored and exempted from shortening. When this flag is enabled, the following types of lines are impacted:

  • if statements
  • for statements
  • switch, select, and case statements
  • function and method declaration
  • interface methods

This option allows for the use of golines while still conforming to the Google Go style guide guidelines for line length which say that a line should not be split before a change in indentation.

It is also worth noting that most of this functionality is already present in golines and I only needed to add code to modify how functions and methods, case calluses, and interface methods are handled for shortening.

Feature fix for #151

@seg-atlantis-prod
Copy link

Atlantis commands can't be run on fork pull requests. To enable, set --allow-fork-prs or, to disable this message, set --silence-fork-pr-errors

@seg-atlantis-prod
Copy link

Error parsing command: EOF found when expecting closing quote

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant