mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Rename the swift-format utility to swift-indent
This is to distinguish the C++ indenting functionality from the new formatter that is written in Swift.
This commit is contained in:
@@ -33,7 +33,7 @@ namespace options {
|
||||
DoesNotAffectIncrementalBuild = (1 << 8),
|
||||
AutolinkExtractOption = (1 << 9),
|
||||
ModuleWrapOption = (1 << 10),
|
||||
SwiftFormatOption = (1 << 11),
|
||||
SwiftIndentOption = (1 << 11),
|
||||
ArgumentIsPath = (1 << 12),
|
||||
ModuleInterfaceOption = (1 << 13),
|
||||
};
|
||||
|
||||
@@ -29,8 +29,8 @@ def AutolinkExtractOption : OptionFlag;
|
||||
// The option should be accepted by swift -modulewrap
|
||||
def ModuleWrapOption : OptionFlag;
|
||||
|
||||
// The option should be accepted by swift-format
|
||||
def SwiftFormatOption : OptionFlag;
|
||||
// The option should be accepted by swift-indent
|
||||
def SwiftIndentOption : OptionFlag;
|
||||
|
||||
// The option should not be accepted by the driver.
|
||||
def NoDriverOption : OptionFlag;
|
||||
@@ -152,7 +152,7 @@ def driver_mode : Joined<["--"], "driver-mode=">, Flags<[HelpHidden]>,
|
||||
HelpText<"Set the driver mode to either 'swift' or 'swiftc'">;
|
||||
|
||||
def help : Flag<["-", "--"], "help">,
|
||||
Flags<[FrontendOption, AutolinkExtractOption, ModuleWrapOption, SwiftFormatOption]>,
|
||||
Flags<[FrontendOption, AutolinkExtractOption, ModuleWrapOption, SwiftIndentOption]>,
|
||||
HelpText<"Display available options">;
|
||||
def h : Flag<["-"], "h">, Alias<help>;
|
||||
def help_hidden : Flag<["-", "--"], "help-hidden">,
|
||||
@@ -174,7 +174,7 @@ def _DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>,
|
||||
|
||||
def o : JoinedOrSeparate<["-"], "o">,
|
||||
Flags<[FrontendOption, AutolinkExtractOption, ModuleWrapOption,
|
||||
NoInteractiveOption, SwiftFormatOption, ArgumentIsPath]>,
|
||||
NoInteractiveOption, SwiftIndentOption, ArgumentIsPath]>,
|
||||
HelpText<"Write output to <file>">, MetaVarName<"<file>">;
|
||||
|
||||
def j : JoinedOrSeparate<["-"], "j">, Flags<[DoesNotAffectIncrementalBuild]>,
|
||||
@@ -588,28 +588,28 @@ def AssertConfig : Separate<["-"], "assert-config">,
|
||||
def code_formatting_Group : OptionGroup<"<code formatting options>">;
|
||||
|
||||
def use_tabs : Flag<["-"], "use-tabs">, Group<code_formatting_Group>,
|
||||
Flags<[NoInteractiveOption, NoBatchOption, SwiftFormatOption]>,
|
||||
Flags<[NoInteractiveOption, NoBatchOption, SwiftIndentOption]>,
|
||||
HelpText<"Use tabs for indentation.">;
|
||||
|
||||
def indent_switch_case : Flag<["-"], "indent-switch-case">,
|
||||
Group<code_formatting_Group>,
|
||||
Flags<[NoInteractiveOption, NoBatchOption, SwiftFormatOption]>,
|
||||
Flags<[NoInteractiveOption, NoBatchOption, SwiftIndentOption]>,
|
||||
HelpText<"Indent cases in switch statements.">;
|
||||
|
||||
def in_place : Flag<["-"], "in-place">, Group<code_formatting_Group>,
|
||||
Flags<[NoInteractiveOption, NoBatchOption, SwiftFormatOption]>,
|
||||
Flags<[NoInteractiveOption, NoBatchOption, SwiftIndentOption]>,
|
||||
HelpText<"Overwrite input file with formatted file.">;
|
||||
|
||||
def tab_width : Separate<["-"], "tab-width">, Group<code_formatting_Group>,
|
||||
Flags<[NoInteractiveOption, NoBatchOption, SwiftFormatOption]>,
|
||||
Flags<[NoInteractiveOption, NoBatchOption, SwiftIndentOption]>,
|
||||
HelpText<"Width of tab character.">, MetaVarName<"<n>">;
|
||||
|
||||
def indent_width : Separate<["-"], "indent-width">, Group<code_formatting_Group>,
|
||||
Flags<[NoInteractiveOption, NoBatchOption, SwiftFormatOption]>,
|
||||
Flags<[NoInteractiveOption, NoBatchOption, SwiftIndentOption]>,
|
||||
HelpText<"Number of characters to indent.">, MetaVarName<"<n>">;
|
||||
|
||||
def line_range : Separate<["-"], "line-range">, Group<code_formatting_Group>,
|
||||
Flags<[NoInteractiveOption, NoBatchOption, SwiftFormatOption]>,
|
||||
Flags<[NoInteractiveOption, NoBatchOption, SwiftIndentOption]>,
|
||||
HelpText<"<start line>:<end line>. Formats a range of lines (1-based). "
|
||||
"Can only be used with one input file.">, MetaVarName<"<n:n>">;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user