generated from tipragot/rust
Initial commit
This commit is contained in:
commit
22ddf8d09b
19
.gitea/workflows/rust.yml
Normal file
19
.gitea/workflows/rust.yml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
on: [push, pull_request]
|
||||||
|
name: Rust Checks
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
checks:
|
||||||
|
runs-on: main
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Use cache
|
||||||
|
run: mkdir -p /cache/${{ gitea.repository }} && ln -s /cache/${{ gitea.repository }} target
|
||||||
|
- name: Cargo fmt
|
||||||
|
run: cargo fmt --check
|
||||||
|
- name: Cargo build
|
||||||
|
run: cargo build
|
||||||
|
- name: Cargo test
|
||||||
|
run: cargo test
|
||||||
|
- name: Cargo clippy
|
||||||
|
run: cargo clippy -- -D warnings
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/target
|
7
Cargo.lock
generated
Normal file
7
Cargo.lock
generated
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# This file is automatically @generated by Cargo.
|
||||||
|
# It is not intended for manual editing.
|
||||||
|
version = 3
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "border-wars"
|
||||||
|
version = "0.1.0"
|
16
Cargo.toml
Normal file
16
Cargo.toml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
[package]
|
||||||
|
name = "border-wars"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
description = "An online turn based game."
|
||||||
|
repository = "https://git.tipragot.fr/corentin/border-wars.git"
|
||||||
|
authors = ["corentin"]
|
||||||
|
|
||||||
|
[lints.rust]
|
||||||
|
missing_docs = "warn"
|
||||||
|
|
||||||
|
[lints.clippy]
|
||||||
|
missing_docs_in_private_items = "warn"
|
||||||
|
unwrap_in_result = "warn"
|
||||||
|
unwrap_used = "warn"
|
||||||
|
nursery = "warn"
|
18
rustfmt.toml
Normal file
18
rustfmt.toml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
use_try_shorthand = true
|
||||||
|
use_field_init_shorthand = true
|
||||||
|
|
||||||
|
version = "Two"
|
||||||
|
error_on_line_overflow = true
|
||||||
|
error_on_unformatted = true
|
||||||
|
|
||||||
|
format_code_in_doc_comments = true
|
||||||
|
format_macro_bodies = true
|
||||||
|
format_macro_matchers = true
|
||||||
|
format_strings = true
|
||||||
|
|
||||||
|
imports_granularity = "Module"
|
||||||
|
group_imports = "StdExternalCrate"
|
||||||
|
|
||||||
|
normalize_doc_attributes = true
|
||||||
|
normalize_comments = true
|
||||||
|
wrap_comments = true
|
5
src/main.rs
Normal file
5
src/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
//! A simple program that prints "Hello, world!" to the terminal.
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
println!("Hello, world!");
|
||||||
|
}
|
Loading…
Reference in a new issue