mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-27 15:17:38 +00:00
feat(tauri): Add Rust linting and formatting configuration
- Add .cargo/config.toml with comprehensive clippy warnings - Add clippy.toml with custom thresholds for code complexity - Add rustfmt.toml with formatting rules for consistent code style
This commit is contained in:
parent
c9933c896e
commit
0d9232574c
3 changed files with 45 additions and 0 deletions
15
tauri/src-tauri/.cargo/config.toml
Normal file
15
tauri/src-tauri/.cargo/config.toml
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
[target.'cfg(all())']
|
||||||
|
rustflags = [
|
||||||
|
"-W", "clippy::all",
|
||||||
|
"-W", "clippy::pedantic",
|
||||||
|
"-W", "clippy::nursery",
|
||||||
|
"-W", "clippy::cargo",
|
||||||
|
"-A", "clippy::module_name_repetitions",
|
||||||
|
"-A", "clippy::must_use_candidate",
|
||||||
|
"-A", "clippy::missing_errors_doc",
|
||||||
|
"-A", "clippy::missing_panics_doc",
|
||||||
|
"-A", "clippy::similar_names",
|
||||||
|
"-A", "clippy::too_many_lines",
|
||||||
|
"-A", "clippy::cargo_common_metadata",
|
||||||
|
"-A", "clippy::multiple_crate_versions",
|
||||||
|
]
|
||||||
8
tauri/src-tauri/clippy.toml
Normal file
8
tauri/src-tauri/clippy.toml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
# Clippy configuration
|
||||||
|
cognitive-complexity-threshold = 30
|
||||||
|
too-many-arguments-threshold = 8
|
||||||
|
type-complexity-threshold = 250
|
||||||
|
single-char-binding-names-threshold = 4
|
||||||
|
too-many-lines-threshold = 400
|
||||||
|
array-size-threshold = 512
|
||||||
|
enum-variant-name-threshold = 3
|
||||||
22
tauri/src-tauri/rustfmt.toml
Normal file
22
tauri/src-tauri/rustfmt.toml
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
# Rust formatting configuration
|
||||||
|
edition = "2021"
|
||||||
|
max_width = 100
|
||||||
|
tab_spaces = 4
|
||||||
|
use_small_heuristics = "Default"
|
||||||
|
reorder_imports = true
|
||||||
|
reorder_modules = true
|
||||||
|
remove_nested_parens = true
|
||||||
|
match_arm_blocks = true
|
||||||
|
use_field_init_shorthand = true
|
||||||
|
use_try_shorthand = true
|
||||||
|
newline_style = "Auto"
|
||||||
|
format_code_in_doc_comments = true
|
||||||
|
wrap_comments = true
|
||||||
|
comment_width = 80
|
||||||
|
normalize_comments = true
|
||||||
|
normalize_doc_attributes = true
|
||||||
|
format_strings = true
|
||||||
|
format_macro_matchers = true
|
||||||
|
format_macro_bodies = true
|
||||||
|
imports_granularity = "Crate"
|
||||||
|
group_imports = "StdExternalCrate"
|
||||||
Loading…
Reference in a new issue