Skip to content
This repository was archived by the owner on Dec 19, 2025. It is now read-only.

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

Open
j-d-ha wants to merge 5 commits into
segmentio:masterfrom
j-d-ha:feature/ignore-indent-change
Open

feat: Add option to ignore lines before indentation change#152
j-d-ha wants to merge 5 commits into
segmentio:masterfrom
j-d-ha:feature/ignore-indent-change

Conversation

@j-d-ha

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

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown
Error parsing command: EOF found when expecting closing quote

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