-
-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathCargo.toml
More file actions
76 lines (64 loc) · 1.89 KB
/
Copy pathCargo.toml
File metadata and controls
76 lines (64 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
[package]
name = "gdscript-formatter"
version = "0.21.0"
edition = "2024"
description = "A GDScript code formatter using Tree-sitter"
license = "MIT"
repository = "https://github.com/gdquest/gdscript-formatter"
readme = "README.md"
keywords = ["godot", "gdscript", "format", "lint"]
categories = ["command-line-utilities", "development-tools"]
default-run = "gdscript-formatter"
rust-version = "1.85"
[lints.clippy]
dbg_macro = "warn"
branches_sharing_code = "warn"
needless_pass_by_value = "warn"
unused_self = "warn"
# We don't allow unwraps in code (use except() instead to give reason), except
# in test modules/unit test code blocks.
unwrap_used = "warn"
# Performance-related lints: remind to pre-allocate vecs and warn about value
# clones
vec_init_then_push = "warn"
ptr_arg = "warn"
# Style-related lints
redundant_closure = "warn"
redundant_closure_for_method_calls = "warn"
needless_return = "warn"
match_same_arms = "warn"
single_match_else = "warn"
manual_strip = "warn"
cast_lossless = "warn"
# In our coding guidelines we favor plain loops over rust iterators and
# functional-style functions, these linter configs allow us to use more
# procedural code.
needless_range_loop = "allow"
manual_find = "allow"
manual_filter_map = "allow"
manual_flatten = "allow"
manual_try_fold = "allow"
[dependencies]
tree-sitter-gdscript = { git = "https://github.com/GDQuest/tree-sitter-gdscript.git", branch = "gdquest/gdscript-formatter" }
tree-sitter = "=0.26.8"
regex = "=1.12.3"
# Official editorconfig parser
ec4rs = "=1.2.0"
[dev-dependencies]
test_each_file = "=0.3.7"
similar = "=2.7.0"
[features]
default = ["gdscript"]
gdscript = []
[[bin]]
name = "gdscript-formatter"
path = "src/main.rs"
[profile.release]
strip = true
lto = true
# For the profiler, we want optimizations but also debug symbols so we can see
# function names in the profiler UI.
[profile.profiling]
inherits = "release"
debug = true
strip = false