Skip to content

Commit

Permalink
add new flags from shellcheck v0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
blmaier committed Mar 9, 2024
1 parent 3573371 commit 2a3fb6c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/shellcheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ pub struct ShellcheckArgs {
#[arg(short='a', long="check-sourced")]
check_sourced: bool,

/// Perform dataflow analysis (Shellcheck)
#[arg(long)]
extended_analysis: Option<String>,

/// Output format (Shellcheck)
#[arg(short='f', long, default_value_t = ShellcheckFormat::Json1)]
format: ShellcheckFormat,
Expand All @@ -41,6 +45,10 @@ pub struct ShellcheckArgs {
#[arg(long)]
norc: bool,

/// Prefer the specified configuration file over searching for one (Shellcheck)
#[arg(long)]
rcfile: Option<String>,

/// Specify dialect (Shellcheck)
#[arg(short='s', long)]
shell: Option<String>,
Expand Down Expand Up @@ -82,10 +90,16 @@ impl Shellcheck {
if self.args.check_sourced {
command.arg("--check-sourced");
}
if let Some(extan) = &self.args.extended_analysis {
command.arg("--extended-analysis").arg(extan);
}
command.arg("--format").arg(self.args.format.to_string());
if self.args.norc {
command.arg("--norc");
}
if let Some(rcfile) = &self.args.rcfile {
command.arg("--rcfile").arg(rcfile);
}
if let Some(shell) = &self.args.shell {
command.arg("--shell").arg(shell);
}
Expand Down

0 comments on commit 2a3fb6c

Please sign in to comment.