ci: add comprehensive formatting and linting setup
- Add formatting commands to justfile (format, fmt_check, clippy_check, fc) - Create GitHub Actions workflows for automated fmt and clippy checks - Fix existing clippy warnings in macro code - Ensure CI enforcement of code quality standards This brings native_model in line with native_db's robust formatting and linting approach.
This commit is contained in:
committed by
Vincent Herlemont
parent
64b1d15dd1
commit
31efa79429
@@ -27,7 +27,7 @@ pub(crate) struct ModelAttributes {
|
||||
pub(crate) try_from: Option<(Path, Path)>,
|
||||
}
|
||||
|
||||
impl Default for ModelAttributes {
|
||||
impl Default for ModelAttributes {
|
||||
fn default() -> Self {
|
||||
ModelAttributes {
|
||||
id: None,
|
||||
@@ -57,10 +57,7 @@ impl ModelAttributes {
|
||||
fields.next().unwrap().clone(),
|
||||
));
|
||||
} else {
|
||||
panic!(
|
||||
"Unknown attribute: {}",
|
||||
meta.path.get_ident().unwrap().to_string()
|
||||
);
|
||||
panic!("Unknown attribute: {}", meta.path.get_ident().unwrap());
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -19,5 +19,5 @@ pub(crate) fn generate_native_model_decode_body(attrs: &ModelAttributes) -> Toke
|
||||
}
|
||||
};
|
||||
|
||||
gen.into()
|
||||
gen
|
||||
}
|
||||
|
||||
@@ -14,5 +14,5 @@ pub(crate) fn generate_native_model_encode_body(attrs: &ModelAttributes) -> Toke
|
||||
}
|
||||
};
|
||||
|
||||
gen.into()
|
||||
gen
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user