mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-07 08:05:31 +02:00
[ci] add fmt + lint checking
This commit is contained in:
parent
0c3946dd5b
commit
fa54b82e52
2 changed files with 21 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -483,7 +483,7 @@ impl ArticleScraper {
|
|||
}
|
||||
|
||||
error!("Failed to get parent of iframe");
|
||||
return Err(ScraperErrorKind::Xml.into());
|
||||
// return Err(ScraperErrorKind::Xml.into());
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue