Shiakaron wrote:

> While I absolutely share this sorting, it is already possible with the 
> regexes and the priorities without any doubt or confusion.

@HazardyKnusperkeks I have tried to achieve this using regexes and priorities 
but could only go far due to the iterative nature of this sorting. This is what 
we have, which fails to replicate the desired logic:

```
IncludeCategories:
  - Regex: '^[^/]*$'
    SortPriority: 0
  - Regex: '^[^/]*/[^/]*$'
    SortPriority: 1
  - Regex: '^[^/]*(/[^/]*){2}$'
    SortPriority: 2
  - Regex: '^[^/]*(/[^/]*){3}$'
    SortPriority: 3
  - Regex: '^[^/]*(/[^/]*){4}$'
    SortPriority: 4
  - Regex: '^[^/]*(/[^/]*){5}$'
    SortPriority: 5
```

Is it possible for you to share the your clang format settings? I would be so 
happy if this is really possible with the regexes and sort priorities

https://github.com/llvm/llvm-project/pull/208954
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to