ccc #14

Merged
leon merged 18 commits from ccc into main 2024-02-09 21:26:46 +01:00
4 changed files with 58 additions and 7 deletions

View File

@ -6,19 +6,35 @@ platform:
steps: steps:
- name: build [debug] - name: build [debug]
image: rust:alpine image: rust:1.71.1-slim-bookworm
commands: commands:
- rustc --version - rustc --version
- cargo --version - cargo --version
- cargo build --verbose --all - cargo build --verbose --all
- name: test [debug] - name: test [debug]
image: rust:alpine image: rust:1.71.1-slim-bookworm
commands: commands:
- rustc --version - rustc --version
- cargo --version - cargo --version
- cargo test --verbose --all - cargo test --verbose --all
- name: lint-clippy [debug]
image: rust:1.71.1-alpine
commands:
- rustc --version
- cargo --version
- rustup component add clippy
- cargo clippy --verbose --all
- name: format [debug]
image: rust:1.71.1-alpine
commands:
- rustc --version
- cargo --version
- rustup component add rustfmt
- cargo fmt --verbose --all --check
--- ---
kind: pipeline kind: pipeline
name: arm64 [debug] name: arm64 [debug]
@ -28,19 +44,41 @@ platform:
steps: steps:
- name: build [debug] - name: build [debug]
image: rust:alpine image: rust:1.71.1-slim-bookworm
commands: commands:
- rustc --version - rustc --version
- cargo --version - cargo --version
- cargo build --verbose --all - cargo build --verbose --all
- name: test [debug] - name: test [debug]
image: rust:alpine image: rust:1.71.1-slim-bookworm
commands: commands:
- rustc --version - rustc --version
- cargo --version - cargo --version
- cargo test --verbose --all - cargo test --verbose --all
- name: lint-clippy [debug]
image: rust:1.71.1-alpine
commands:
- rustc --version
- cargo --version
# Stupid workarounds, for stupid problems
- echo "nameserver 1.1.1.1" >> /etc/resolv.conf
- echo "nameserver 1.0.0.1" >> /etc/resolv.conf
- rustup component add clippy
- cargo clippy --verbose --all
- name: format [debug]
image: rust:1.71.1-alpine
commands:
- rustc --version
- cargo --version
# Stupid workarounds, for stupid problems
- echo "nameserver 1.1.1.1" >> /etc/resolv.conf
- echo "nameserver 1.0.0.1" >> /etc/resolv.conf
- rustup component add rustfmt
- cargo fmt --verbose --all --check
--- ---
kind: pipeline kind: pipeline
name: amd64 [release] name: amd64 [release]
@ -50,7 +88,7 @@ platform:
steps: steps:
- name: build and test [release] - name: build and test [release]
image: rust:alpine image: rust:1.71.1-slim-bookworm
commands: commands:
- rustc --version - rustc --version
- cargo --version - cargo --version
@ -65,7 +103,7 @@ platform:
steps: steps:
- name: build and test [release] - name: build and test [release]
image: rust:alpine image: rust:1.71.1-slim-bookworm
commands: commands:
- rustc --version - rustc --version
- cargo --version - cargo --version

View File

@ -6,3 +6,15 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
[lints.rust]
unsafe_code = "forbid"
[lints.clippy]
enum_glob_use = "deny" # https://rust-lang.github.io/rust-clippy/master/index.html#/enum_glob_use
pedantic = "deny" # https://rust-lang.github.io/rust-clippy/master/index.html#/?groups=pedantic
nursery = "deny" # wip lints: https://rust-lang.github.io/rust-clippy/master/index.html#/?groups=nursery
unwrap_used = "deny" # https://rust-lang.github.io/rust-clippy/master/index.html#/unwrap_used
missing_const_for_fn = "warn" # https://rust-lang.github.io/rust-clippy/master/index.html#/missing_const_for_fn
missing_assert_message = "deny" # https://rust-lang.github.io/rust-clippy/master/index.html#/missing_assert_message
missing_errors_doc = "deny" # https://rust-lang.github.io/rust-clippy/master/index.html#/missing_assert_message

1
rustfmt.toml Normal file
View File

@ -0,0 +1 @@
hard_tabs = true