1
/*
2
 * Hurl (https://hurl.dev)
3
 * Copyright (C) 2025 Orange
4
 *
5
 * Licensed under the Apache License, Version 2.0 (the "License");
6
 * you may not use this file except in compliance with the License.
7
 * You may obtain a copy of the License at
8
 *
9
 *          http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 * See the License for the specific language governing permissions and
15
 * limitations under the License.
16
 *
17
 */
18
// Generated by bin/spec/options/generate_source.py - Do not modify
19

            
20
204
pub fn input_files() -> clap::Arg {
21
204
    clap::Arg::new("input_files")
22
204
        .value_name("FILES")
23
204
        .help("Set the input file to use")
24
204
        .required(false)
25
204
        .index(1)
26
204
        .num_args(1..)
27
}
28

            
29
204
pub fn check() -> clap::Arg {
30
204
    clap::Arg::new("check")
31
204
        .long("check")
32
204
        .help("Run in check mode")
33
204
        .conflicts_with("output")
34
204
        .action(clap::ArgAction::SetTrue)
35
}
36

            
37
204
pub fn color() -> clap::Arg {
38
204
    clap::Arg::new("color")
39
204
        .long("color")
40
204
        .help("Colorize Output")
41
204
        .conflicts_with("no_color")
42
204
        .conflicts_with("in_place")
43
204
        .action(clap::ArgAction::SetTrue)
44
}
45

            
46
204
pub fn in_place() -> clap::Arg {
47
204
    clap::Arg::new("in_place")
48
204
        .long("in-place")
49
204
        .help("Modify files in place")
50
204
        .conflicts_with("output")
51
204
        .conflicts_with("color")
52
204
        .action(clap::ArgAction::SetTrue)
53
}
54

            
55
204
pub fn input_format() -> clap::Arg {
56
204
    clap::Arg::new("input_format")
57
204
        .long("in")
58
204
        .value_name("FORMAT")
59
204
        .default_value("hurl")
60
204
        .help("Specify input format: hurl or curl")
61
204
        .num_args(1)
62
}
63

            
64
204
pub fn no_color() -> clap::Arg {
65
204
    clap::Arg::new("no_color")
66
204
        .long("no-color")
67
204
        .help("Do not colorize output")
68
204
        .conflicts_with("color")
69
204
        .action(clap::ArgAction::SetTrue)
70
}
71

            
72
204
pub fn output() -> clap::Arg {
73
204
    clap::Arg::new("output")
74
204
        .long("output")
75
204
        .short('o')
76
204
        .value_name("FILE")
77
204
        .help("Write to FILE instead of stdout")
78
204
        .num_args(1)
79
}
80

            
81
204
pub fn output_format() -> clap::Arg {
82
204
    clap::Arg::new("output_format")
83
204
        .long("out")
84
204
        .value_name("FORMAT")
85
204
        .default_value("hurl")
86
204
        .help("Specify output format: hurl, json or html")
87
204
        .conflicts_with("check")
88
204
        .num_args(1)
89
}
90

            
91
204
pub fn standalone() -> clap::Arg {
92
204
    clap::Arg::new("standalone")
93
204
        .long("standalone")
94
204
        .help("Standalone HTML")
95
204
        .conflicts_with("no_color")
96
204
        .action(clap::ArgAction::SetTrue)
97
}