mirror of
https://github.com/bahdotsh/wrkflw.git
synced 2026-02-23 19:39:42 +01:00
formatted
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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<_>>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user