Skip to content

Feature Request: sp_after_ellipsis (Ellipsis in Obj-C) #1213

Closed

Description

@ferologics

I'm using the ... in a case statement

switch (foo)
{
  case 0 ... 1: break;
}

Uncrustify will remove the spaces around the operator:

switch (foo)
{
  case 0...1: break;
}

This causes error:
uncrustify_error

What can I use to change the behavior? I googled this for 20 minutes without any results.

EDIT: It also adds a space after the - eg.

switch (foo)
{
  case -10...- 20: break;
}

Activity

  1. CDanU commented on Jun 21, 2017

    @CDanU
    Collaborator

    Check if the PR fixes your first problem (it should) without opening new bugs.

    I am not sure if an sp_after_ellipsis option is needed. Are there places in oc that allow ellipsis that are not surrounded by spaces?

  2. CDanU commented on Jul 10, 2017

    @CDanU
    Collaborator

    @ferologics So? Did you test the PR?

  3. CDanU commented on Jul 14, 2017

    @CDanU
    Collaborator

    @mihaipopescu could you test that?

    Seeing that the link that he provided is about a gcc extension, is this even useful in OC? I am closing the PR temporarily.

  4. Krizai commented on Oct 7, 2017

    @Krizai
    Contributor

    @CDanU Didn't know about this extension, but true - it exists and is supported in clang.

  5. mihaipopescu commented on Oct 9, 2017

    @mihaipopescu
    Collaborator

    Totally missed that message. The fix looks good to me.

  6. guy-maurel commented on Feb 28, 2018

    @guy-maurel
    Contributor

    The current git version works pretty fine.
    https://github.com/uncrustify/uncrustify
    Please test it and report!

  7. added
    NoAnswer
    on Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    NoAnswerObjective C

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions