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("format")
34
195
        .conflicts_with("output")
35
195
        .action(clap::ArgAction::SetTrue)
36
}
37

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

            
47
195
pub fn format() -> clap::Arg {
48
195
    clap::Arg::new("format")
49
195
        .long("format")
50
195
        .value_name("FORMAT")
51
195
        .help("Specify output format: hurl, json or html")
52
195
        .num_args(1)
53
195
        .hide(true)
54
}
55

            
56
195
pub fn in_place() -> clap::Arg {
57
195
    clap::Arg::new("in_place")
58
195
        .long("in-place")
59
195
        .help("Modify files in place")
60
195
        .conflicts_with("output")
61
195
        .conflicts_with("color")
62
195
        .action(clap::ArgAction::SetTrue)
63
}
64

            
65
195
pub fn input_format() -> clap::Arg {
66
195
    clap::Arg::new("input_format")
67
195
        .long("in")
68
195
        .value_name("FORMAT")
69
195
        .default_value("hurl")
70
195
        .help("Specify input format: hurl or curl")
71
195
        .num_args(1)
72
}
73

            
74
195
pub fn no_color() -> clap::Arg {
75
195
    clap::Arg::new("no_color")
76
195
        .long("no-color")
77
195
        .help("Do not colorize output")
78
195
        .conflicts_with("color")
79
195
        .action(clap::ArgAction::SetTrue)
80
}
81

            
82
195
pub fn output() -> clap::Arg {
83
195
    clap::Arg::new("output")
84
195
        .long("output")
85
195
        .short('o')
86
195
        .value_name("FILE")
87
195
        .help("Write to FILE instead of stdout")
88
195
        .num_args(1)
89
}
90

            
91
195
pub fn output_format() -> clap::Arg {
92
195
    clap::Arg::new("output_format")
93
195
        .long("out")
94
195
        .value_name("FORMAT")
95
195
        .default_value("hurl")
96
195
        .help("Specify output format: hurl, json or html")
97
195
        .conflicts_with("check")
98
195
        .num_args(1)
99
}
100

            
101
195
pub fn standalone() -> clap::Arg {
102
195
    clap::Arg::new("standalone")
103
195
        .long("standalone")
104
195
        .help("Standalone HTML")
105
195
        .conflicts_with("no_color")
106
195
        .action(clap::ArgAction::SetTrue)
107
}