diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a399c90..a1ba8a7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,8 @@ image: rust:latest stages: - build + - fmt + - lint run-build: stage: build @@ -9,3 +11,21 @@ run-build: script: - rustc --version && cargo --version - cargo build --release --jobs 1 + +run-fmt: + stage: fmt + image: rust:latest + before_script: + - rustup component add rustfmt + script: + - rustc --version && cargo --version + - cargo fmt -- --check + +run-lint: + stage: lint + image: rust:latest + before_script: + - rustup component add clippy + script: + - rustc --version && cargo --version + - cargo clippy --all-targets --all-features -- -D warnings diff --git a/src/lib.rs b/src/lib.rs index 73ebbe3..f03ce10 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -483,7 +483,7 @@ impl ArticleScraper { } error!("Failed to get parent of iframe"); - return Err(ScraperErrorKind::Xml.into()); + // return Err(ScraperErrorKind::Xml.into()); } Ok(()) }