Fail CI on rustc warnings
This commit is contained in:
parent
e50bbd468d
commit
de3713255b
3 changed files with 45 additions and 27 deletions
|
|
@ -21,11 +21,11 @@ jobs:
|
||||||
- name: format
|
- name: format
|
||||||
run: just format-assess
|
run: just format-assess
|
||||||
- name: lint
|
- name: lint
|
||||||
run: just lint
|
run: just lint-assess
|
||||||
- name: check
|
- name: check
|
||||||
run: just check
|
run: just check-assess
|
||||||
- name: test
|
- name: test
|
||||||
run: just test
|
run: just test-assess
|
||||||
- name: coverage
|
- name: coverage
|
||||||
run: just cover-assess
|
run: just cover-assess
|
||||||
|
|
||||||
|
|
|
||||||
65
.justfile
65
.justfile
|
|
@ -5,7 +5,7 @@ watch_cmd := "watchexec -qc -r -e rs,toml,html --color always -- "
|
||||||
cover_cmd := 'cargo llvm-cov --color always --ignore-filename-regex "main\.rs|dev\.rs"'
|
cover_cmd := 'cargo llvm-cov --color always --ignore-filename-regex "main\.rs|dev\.rs"'
|
||||||
just_cmd := 'just --unstable --timestamp --explain --command-color green'
|
just_cmd := 'just --unstable --timestamp --explain --command-color green'
|
||||||
|
|
||||||
# DEV
|
# DEVELOP
|
||||||
|
|
||||||
# Start server
|
# Start server
|
||||||
[group: 'develop']
|
[group: 'develop']
|
||||||
|
|
@ -51,6 +51,13 @@ check-watch:
|
||||||
|
|
||||||
alias cw := check-watch
|
alias cw := check-watch
|
||||||
|
|
||||||
|
# Lint
|
||||||
|
[group: 'develop']
|
||||||
|
lint:
|
||||||
|
cargo clippy
|
||||||
|
|
||||||
|
alias l := lint
|
||||||
|
|
||||||
# Lint on changes
|
# Lint on changes
|
||||||
[group: 'develop']
|
[group: 'develop']
|
||||||
lint-watch:
|
lint-watch:
|
||||||
|
|
@ -79,11 +86,26 @@ push: verify
|
||||||
|
|
||||||
alias p := push
|
alias p := push
|
||||||
|
|
||||||
|
# Make coverage report
|
||||||
|
[group: 'develop']
|
||||||
|
cover-report: cover
|
||||||
|
{{ cover_cmd }} report --html
|
||||||
|
{{ cover_cmd }} report
|
||||||
|
|
||||||
|
alias or := cover-report
|
||||||
|
|
||||||
|
# Open coverage report
|
||||||
|
[group: 'develop']
|
||||||
|
cover-open: cover
|
||||||
|
{{ cover_cmd }} report --open
|
||||||
|
|
||||||
|
alias oo := cover-open
|
||||||
|
|
||||||
# ANALYSIS
|
# ANALYSIS
|
||||||
|
|
||||||
# Run all analysis
|
# Run all analysis
|
||||||
[group: 'assess']
|
[group: 'assess']
|
||||||
verify: format-assess lint check test cover-assess
|
verify: format-assess lint-assess check-assess test-assess cover-assess
|
||||||
|
|
||||||
alias v := verify
|
alias v := verify
|
||||||
|
|
||||||
|
|
@ -99,12 +121,12 @@ format-assess:
|
||||||
|
|
||||||
alias fc := format-assess
|
alias fc := format-assess
|
||||||
|
|
||||||
# Lint with Clippy
|
# Assess lints
|
||||||
[group: 'assess']
|
[group: 'assess']
|
||||||
lint:
|
lint-assess $RUSTFLAGS="-Dwarnings":
|
||||||
cargo clippy
|
cargo clippy
|
||||||
|
|
||||||
alias l := lint
|
alias la := lint-assess
|
||||||
|
|
||||||
# Run cargo check
|
# Run cargo check
|
||||||
[group: 'assess']
|
[group: 'assess']
|
||||||
|
|
@ -113,6 +135,20 @@ check:
|
||||||
|
|
||||||
alias c := check
|
alias c := check
|
||||||
|
|
||||||
|
# Fail on any cargo check warnings
|
||||||
|
[group: 'assess']
|
||||||
|
check-assess $RUSTFLAGS="-Dwarnings":
|
||||||
|
cargo check --workspace
|
||||||
|
|
||||||
|
alias ca := check
|
||||||
|
|
||||||
|
# Assess warnings in tests
|
||||||
|
[group: 'assess']
|
||||||
|
test-assess $RUSTFLAGS="-Dwarnings":
|
||||||
|
just test
|
||||||
|
|
||||||
|
alias ta := test-assess
|
||||||
|
|
||||||
# Run tests
|
# Run tests
|
||||||
[group: 'assess']
|
[group: 'assess']
|
||||||
test:
|
test:
|
||||||
|
|
@ -129,23 +165,6 @@ cover:
|
||||||
|
|
||||||
alias o := cover
|
alias o := cover
|
||||||
|
|
||||||
## COVER
|
|
||||||
|
|
||||||
# Make coverage report
|
|
||||||
[group: 'cover']
|
|
||||||
cover-report: cover
|
|
||||||
{{ cover_cmd }} report --html
|
|
||||||
{{ cover_cmd }} report
|
|
||||||
|
|
||||||
alias or := cover-report
|
|
||||||
|
|
||||||
# Open coverage report
|
|
||||||
[group: 'cover']
|
|
||||||
cover-open: cover
|
|
||||||
{{ cover_cmd }} report --open
|
|
||||||
|
|
||||||
alias oo := cover-open
|
|
||||||
|
|
||||||
# BUILD
|
# BUILD
|
||||||
|
|
||||||
# Build project with Cargo
|
# Build project with Cargo
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,6 @@ impl Anchor {
|
||||||
mod tests {
|
mod tests {
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::syntax::content::parser::read;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn render_anchor() {
|
fn render_anchor() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue