You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
clang-format: Add IgnoreExtension option to SortIncludesOptions
Sorting without taking the file extension into account gives nicer results
when various header file names are substrings of other header file names,
for example, a CLI application with a main header named analyze.h and a
analyze-xxx.h header for each subcommand currently will always put analyze.h
last after all the analyze-xxx.h headers, but putting analyze.h first instead
of last is arguable nicer to read.
TLDR; Instead of
"""
/#include "analyze-blame.h"
/#include "analyze.h"
"""
You'd get
"""
/#include "analyze.h"
/#include "analyze-blame.h"
"""
Let's allow sorting without taking the file extension into account unless two
headers otherwise compare equal by introducing a new boolean option IgnoreExtension
for SortIncludesOptions.
0 commit comments