From 6f142f5c3949ab459657849c2c12028617d7ff64 Mon Sep 17 00:00:00 2001 From: Bauke Date: Thu, 6 Oct 2022 14:48:31 +0200 Subject: [PATCH] Add project files. --- .env.example | 5 +++++ .gitignore | 9 +++++++++ Makefile.toml | 39 +++++++++++++++++++++++++++++++++++++++ rustfmt.toml | 2 ++ 4 files changed, 55 insertions(+) create mode 100644 .env.example create mode 100644 .gitignore create mode 100644 Makefile.toml create mode 100644 rustfmt.toml diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..1cc7ed8 --- /dev/null +++ b/.env.example @@ -0,0 +1,5 @@ +# The database connection string for PostgreSQL. +# DATABASE_URL="postgres://user:password@127.0.0.1:5432/database" + +# The User-Agent string for HTTP requests, replace the email with yours. +# USER_AGENT="Tildes Statistics (your-email@example.org)" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fc7b209 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +# Generated by Cargo +debug/ +target/ + +# Code coverage results +coverage/ + +# Environment configuration +.env diff --git a/Makefile.toml b/Makefile.toml new file mode 100644 index 0000000..d640ca1 --- /dev/null +++ b/Makefile.toml @@ -0,0 +1,39 @@ +[tasks.fmt] +command = "cargo" +args = ["fmt", "${@}"] + +[tasks.check] +command = "cargo" +args = ["check", "${@}"] + +[tasks.clippy] +command = "cargo" +args = ["clippy", "${@}"] + +[tasks.test] +command = "cargo" +args = ["test", "${@}"] + +[tasks.doc] +command = "cargo" +args = ["doc", "${@}"] + +[tasks.build] +command = "cargo" +args = ["build", "${@}"] + +[tasks.complete-check] +dependencies = ["fmt", "check", "clippy", "test", "doc", "build"] + +[tasks.code-coverage] +workspace = false +install_crate = "cargo-tarpaulin" +command = "cargo" +args = [ + "tarpaulin", + "--exclude-files=target/*", + "--out=html", + "--output-dir=coverage", + "--skip-clean", + "--target-dir=target/tarpaulin" +] diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..4c1eefa --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,2 @@ +max_width = 80 +tab_spaces = 2