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

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

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

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

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

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

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

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

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

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