Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
amousset committed Oct 21, 2020
1 parent 2bad0e5 commit b3401b8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rudder-lang/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ libs:
libs-docs: libs
mkdir -p target/docs/std
# FIXME replace with proper option
cargo run -- -l info -c tools/rudderc-dev.conf -n simplest/technique.rl -f md
cargo run -- compile -c tools/rudderc-dev.conf -i simplest/technique.rl -f md
echo "" > target/docs/std/lib.adoc
for resource in $$(ls -1 target/docs/std/*.md); \
do pandoc -t asciidoc -f commonmark $${resource} >> target/docs/std/lib.adoc; \
Expand Down
2 changes: 1 addition & 1 deletion rudder-lang/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ fn get_output_format(

// All formats but Compile are hardcoded in CLI implementation, so this is partly double check
match (command, format) {
(Command::Compile, Some(fmt)) if fmt == Format::CFEngine || fmt == Format::DSC => {
(Command::Compile, Some(fmt)) if fmt == Format::CFEngine || fmt == Format::DSC || fmt == Format::Markdown => {
Ok((format!("{}.{}", "rl", fmt), fmt))
}
(Command::Compile, _) => {
Expand Down
2 changes: 1 addition & 1 deletion rudder-lang/src/io/cli_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub enum CLI {
json_logs: bool,

/// Enforce a compiler output format (overrides configuration format)
#[structopt(long, short, possible_values = &["cf", "cfengine", "dsc"])]
#[structopt(long, short)]
format: Option<Format>,
},
}
Expand Down
2 changes: 1 addition & 1 deletion rudder-lang/tools/generate_lib
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def parse_method_metadata(content):
'name': param_name, 'description': match.group(4)}
param_names.add(param_name)
if tag == "parameter_constraint":
constraint = json.loads("{" + match.group(4) + "}")
constraint = json.loads("{" + match.group(4).replace('\\', '\\\\') + "}")
# extend default_constraint if it was not already defined)
param_constraints.setdefault(
match.group(3), default_constraint.copy()).update(constraint)
Expand Down

0 comments on commit b3401b8

Please sign in to comment.