pub fn run_shellcheck_linter() -> Result<()>Expand description
Run the ShellCheck linter
ยงErrors
Returns an error if shellcheck is not available, cannot be installed, or if the linting fails.
Examples found in repository?
examples/custom_cli.rs (line 50)
30fn main() -> Result<()> {
31 // Initialize logging (you can customize this)
32 torrust_linting::init_tracing();
33
34 let cli = Cli::parse();
35
36 match cli.command {
37 Commands::Rust => {
38 println!("๐ฆ Running Rust linters...");
39 run_clippy_linter()?;
40 run_rustfmt_linter()?;
41 }
42 Commands::Markup => {
43 println!("๐ Running markup linters...");
44 run_markdown_linter()?;
45 run_yaml_linter()?;
46 run_toml_linter()?;
47 }
48 Commands::Shell => {
49 println!("๐ Running shell script linter...");
50 run_shellcheck_linter()?;
51 }
52 }
53
54 println!("โ
All selected linters passed!");
55 Ok(())
56}