run clippy on default, all, and allocator features
This way all 4 major configurations are linted.
This commit is contained in:
parent
838550536a
commit
4faf690f57
40
engage.toml
40
engage.toml
|
@ -78,7 +78,19 @@ RUSTDOCFLAGS="-D warnings" cargo doc \
|
|||
"""
|
||||
|
||||
[[task]]
|
||||
name = "cargo-clippy"
|
||||
name = "clippy/default"
|
||||
group = "lints"
|
||||
script = """
|
||||
cargo clippy \
|
||||
--workspace \
|
||||
--all-targets \
|
||||
--color=always \
|
||||
-- \
|
||||
-D warnings
|
||||
"""
|
||||
|
||||
[[task]]
|
||||
name = "clippy/all"
|
||||
group = "lints"
|
||||
script = """
|
||||
cargo clippy \
|
||||
|
@ -90,6 +102,32 @@ cargo clippy \
|
|||
-D warnings
|
||||
"""
|
||||
|
||||
[[task]]
|
||||
name = "clippy/jemalloc"
|
||||
group = "lints"
|
||||
script = """
|
||||
cargo clippy \
|
||||
--workspace \
|
||||
--features jemalloc \
|
||||
--all-targets \
|
||||
--color=always \
|
||||
-- \
|
||||
-D warnings
|
||||
"""
|
||||
|
||||
[[task]]
|
||||
name = "clippy/hardened_malloc"
|
||||
group = "lints"
|
||||
script = """
|
||||
cargo clippy \
|
||||
--workspace \
|
||||
--features hardened_malloc \
|
||||
--all-targets \
|
||||
--color=always \
|
||||
-- \
|
||||
-D warnings
|
||||
"""
|
||||
|
||||
[[task]]
|
||||
name = "lychee"
|
||||
group = "lints"
|
||||
|
|
|
@ -476,6 +476,9 @@ impl Service {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[cfg(feature = "sha256_media")]
|
||||
#[tokio::test]
|
||||
async fn long_file_names_works() {
|
||||
use std::path::PathBuf;
|
||||
|
||||
use base64::{engine::general_purpose, Engine as _};
|
||||
|
@ -486,8 +489,8 @@ mod tests {
|
|||
|
||||
impl Data for MockedKVDatabase {
|
||||
fn create_file_metadata(
|
||||
&self, _sender_user: Option<&str>, mxc: String, width: u32, height: u32, content_disposition: Option<&str>,
|
||||
content_type: Option<&str>,
|
||||
&self, _sender_user: Option<&str>, mxc: String, width: u32, height: u32,
|
||||
content_disposition: Option<&str>, content_type: Option<&str>,
|
||||
) -> Result<Vec<u8>> {
|
||||
// copied from src/database/key_value/media.rs
|
||||
let mut key = mxc.as_bytes().to_vec();
|
||||
|
@ -526,16 +529,15 @@ mod tests {
|
|||
|
||||
fn remove_url_preview(&self, _url: &str) -> Result<()> { todo!() }
|
||||
|
||||
fn set_url_preview(&self, _url: &str, _data: &UrlPreviewData, _timestamp: std::time::Duration) -> Result<()> {
|
||||
fn set_url_preview(
|
||||
&self, _url: &str, _data: &UrlPreviewData, _timestamp: std::time::Duration,
|
||||
) -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn get_url_preview(&self, _url: &str) -> Option<UrlPreviewData> { todo!() }
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[cfg(feature = "sha256_media")]
|
||||
async fn long_file_names_works() {
|
||||
static DB: MockedKVDatabase = MockedKVDatabase;
|
||||
let media = Service {
|
||||
db: &DB,
|
||||
|
|
Loading…
Reference in New Issue