1
/*
2
 * Hurl (https://hurl.dev)
3
 * Copyright (C) 2024 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
195
pub fn input_files() -> clap::Arg {
21
195
    clap::Arg::new("input_files")
22
195
        .value_name("FILES")
23
195
        .help("Set the input file to use")
24
195
        .required(false)
25
195
        .index(1)
26
195
        .num_args(1..)
27
}
28

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

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

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

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

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

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

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

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