formatted

This commit is contained in:
bahdotsh
2025-05-02 15:09:26 +05:30
parent e73b0df520
commit a97398f949
2 changed files with 8 additions and 6 deletions

View File

@@ -28,8 +28,7 @@ pub fn parse_pipeline(pipeline_path: &Path) -> Result<Pipeline, GitlabParserErro
let pipeline_content = fs::read_to_string(pipeline_path)?;
// Validate against schema
let validator =
SchemaValidator::new().map_err(GitlabParserError::SchemaValidationError)?;
let validator = SchemaValidator::new().map_err(GitlabParserError::SchemaValidationError)?;
validator
.validate_with_specific_schema(&pipeline_content, SchemaType::GitLab)

View File

@@ -1,8 +1,8 @@
use bollard::Docker;
use clap::{Parser, Subcommand};
use std::collections::HashMap;
use std::path::PathBuf;
use std::path::Path;
use std::path::PathBuf;
#[derive(Debug, Parser)]
#[command(
@@ -198,7 +198,8 @@ fn is_gitlab_pipeline(path: &Path) -> bool {
if let Some(parent_str) = parent.to_str() {
if parent_str.ends_with(".gitlab/ci")
&& path
.extension().is_some_and(|ext| ext == "yml" || ext == "yaml")
.extension()
.is_some_and(|ext| ext == "yml" || ext == "yaml")
{
return true;
}
@@ -272,7 +273,8 @@ async fn main() {
entry.path().is_file()
&& entry
.path()
.extension().is_some_and(|ext| ext == "yml" || ext == "yaml")
.extension()
.is_some_and(|ext| ext == "yml" || ext == "yaml")
})
.collect::<Vec<_>>();
@@ -498,7 +500,8 @@ fn list_workflows_and_pipelines(verbose: bool) {
entry.path().is_file()
&& entry
.path()
.extension().is_some_and(|ext| ext == "yml" || ext == "yaml")
.extension()
.is_some_and(|ext| ext == "yml" || ext == "yaml")
})
.collect::<Vec<_>>();