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

Bug: Prefix should ignore space #171

Closed
sp71 opened this issue Sep 17, 2023 · 0 comments · Fixed by #172
Closed

Bug: Prefix should ignore space #171

sp71 opened this issue Sep 17, 2023 · 0 comments · Fixed by #172
Labels
good first issue Good for newcomers

Comments

@sp71
Copy link

sp71 commented Sep 17, 2023

Bug

If the prefix contains a space after the comma, it impacts the gci tool. It's common practice to use a space delimiter between commas in many applications; therefore, spaces should be ignored.

What version of GCI are you using?

0.11.1

Reproduce Steps

.golangci.yaml

linters-settings:
  gci:
    sections:
      - standard
      - default
      - prefix(github.com/company/library, github.com/company)
      - blank
      - dot
    skip-generated: true
    custom-order: true

linters:
  disable-all: true
  enable:
    - errcheck
    - gosimple
    - govet
    - ineffassign
    - staticcheck
    - unused
    - gci

run:
  issues-exit-code: 1

What did you expect to see?

Should group according to prefix ignoring space

What did you see instead?

Did not work as expected due to space. Had to remove space in prefix

      - prefix(github.com/company/library,github.com/company)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants