Skip to content

Commit

Permalink
fix(linter): correctly compute duplicate entries (#2525)
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored Apr 19, 2024
1 parent 4130ff0 commit e523835
Show file tree
Hide file tree
Showing 7 changed files with 237 additions and 219 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b
callFunction(<>{bar}</>)
```
Contributed by @ematipico

- Fix [#2366](https://github.com/biomejs/biome/issues/2366), where `noDuplicateJsonKeys` incorrectly computed the kes to highlight. Contributed by @ematipico
#### Enhancements

- The rule `noMisplacedAssertions` now considers valid calling `expect` inside `waitFor`:
Expand Down
289 changes: 145 additions & 144 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,190 +1,191 @@
[workspace]
# Use the newer version of the cargo resolver
# https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
members = ["crates/*", "xtask/bench", "xtask/codegen", "xtask/coverage", "xtask/libs_bench", "xtask/contributors"]
members = ["crates/*", "xtask/bench", "xtask/codegen", "xtask/coverage", "xtask/libs_bench", "xtask/contributors"]
resolver = "2"

[workspace.lints.rust]
absolute_paths_not_starting_with_crate = "warn"
dead_code = "warn"
trivial_numeric_casts = "warn"
unused_import_braces = "warn"
unused_lifetimes = "warn"
unused_macro_rules = "warn"
dead_code = "warn"
trivial_numeric_casts = "warn"
unused_import_braces = "warn"
unused_lifetimes = "warn"
unused_macro_rules = "warn"

[workspace.lints.clippy]
cargo_common_metadata = "allow"
cargo_common_metadata = "allow"
multiple_crate_versions = "allow"

# pedantic
checked_conversions = "warn"
cloned_instead_of_copied = "warn"
copy_iterator = "warn"
dbg_macro = "warn"
doc_link_with_quotes = "warn"
empty_enum = "warn"
expl_impl_clone_on_copy = "warn"
explicit_into_iter_loop = "warn"
filter_map_next = "warn"
flat_map_option = "warn"
fn_params_excessive_bools = "warn"
checked_conversions = "warn"
cloned_instead_of_copied = "warn"
copy_iterator = "warn"
dbg_macro = "warn"
doc_link_with_quotes = "warn"
empty_enum = "warn"
expl_impl_clone_on_copy = "warn"
explicit_into_iter_loop = "warn"
filter_map_next = "warn"
flat_map_option = "warn"
fn_params_excessive_bools = "warn"
from_iter_instead_of_collect = "warn"
implicit_clone = "warn"
implicit_hasher = "warn"
index_refutable_slice = "warn"
inefficient_to_string = "warn"
invalid_upcast_comparisons = "warn"
iter_not_returning_iterator = "warn"
large_stack_arrays = "warn"
large_types_passed_by_value = "warn"
macro_use_imports = "warn"
manual_ok_or = "warn"
manual_string_new = "warn"
map_flatten = "warn"
map_unwrap_or = "warn"
implicit_clone = "warn"
implicit_hasher = "warn"
index_refutable_slice = "warn"
inefficient_to_string = "warn"
invalid_upcast_comparisons = "warn"
iter_not_returning_iterator = "warn"
large_stack_arrays = "warn"
large_types_passed_by_value = "warn"
macro_use_imports = "warn"
manual_ok_or = "warn"
manual_string_new = "warn"
map_flatten = "warn"
map_unwrap_or = "warn"
mismatching_type_param_order = "warn"
mut_mut = "warn"
naive_bytecount = "warn"
needless_bitwise_bool = "warn"
needless_continue = "warn"
needless_for_each = "warn"
mut_mut = "warn"
naive_bytecount = "warn"
needless_bitwise_bool = "warn"
needless_continue = "warn"
needless_for_each = "warn"
no_effect_underscore_binding = "warn"
ref_binding_to_reference = "warn"
ref_option_ref = "warn"
stable_sort_primitive = "warn"
unnecessary_box_returns = "warn"
unnecessary_join = "warn"
unnested_or_patterns = "warn"
unreadable_literal = "warn"
verbose_bit_mask = "warn"
zero_sized_map_values = "warn"
ref_binding_to_reference = "warn"
ref_option_ref = "warn"
stable_sort_primitive = "warn"
unnecessary_box_returns = "warn"
unnecessary_join = "warn"
unnested_or_patterns = "warn"
unreadable_literal = "warn"
verbose_bit_mask = "warn"
zero_sized_map_values = "warn"

# restriction
empty_drop = "warn"
float_cmp_const = "warn"
get_unwrap = "warn"
infinite_loop = "warn"
lossy_float_literal = "warn"
mem_forget = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
empty_drop = "warn"
float_cmp_const = "warn"
get_unwrap = "warn"
infinite_loop = "warn"
lossy_float_literal = "warn"
mem_forget = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
rest_pat_in_fully_bound_structs = "warn"
verbose_file_reads = "warn"
verbose_file_reads = "warn"

[workspace.package]
authors = ["Biome Developers and Contributors"]
authors = ["Biome Developers and Contributors"]
categories = ["development-tools", "web-programming"]
edition = "2021"
homepage = "https://biomejs.dev/"
keywords = ["parser", "linter", "formatter"]
license = "MIT OR Apache-2.0"
edition = "2021"
homepage = "https://biomejs.dev/"
keywords = ["parser", "linter", "formatter"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/biomejs/biome"

[profile.release-with-debug]
debug = true
debug = true
inherits = "release"

[workspace.dependencies]
# publish
biome_analyze = { version = "0.5.7", path = "./crates/biome_analyze" }
biome_aria = { version = "0.5.7", path = "./crates/biome_aria" }
biome_aria_metadata = { version = "0.5.7", path = "./crates/biome_aria_metadata" }
biome_console = { version = "0.5.7", path = "./crates/biome_console" }
biome_control_flow = { version = "0.5.7", path = "./crates/biome_control_flow" }
biome_css_analyze = { version = "0.5.7", path = "./crates/biome_css_analyze" }
biome_css_factory = { version = "0.5.7", path = "./crates/biome_css_factory" }
biome_css_formatter = { version = "0.5.7", path = "./crates/biome_css_formatter" }
biome_css_parser = { version = "0.5.7", path = "./crates/biome_css_parser" }
biome_css_syntax = { version = "0.5.7", path = "./crates/biome_css_syntax" }
biome_deserialize = { version = "0.5.7", path = "./crates/biome_deserialize" }
biome_deserialize_macros = { version = "0.5.7", path = "./crates/biome_deserialize_macros" }
biome_diagnostics = { version = "0.5.7", path = "./crates/biome_diagnostics" }
biome_analyze = { version = "0.5.7", path = "./crates/biome_analyze" }
biome_aria = { version = "0.5.7", path = "./crates/biome_aria" }
biome_aria_metadata = { version = "0.5.7", path = "./crates/biome_aria_metadata" }
biome_console = { version = "0.5.7", path = "./crates/biome_console" }
biome_control_flow = { version = "0.5.7", path = "./crates/biome_control_flow" }
biome_css_analyze = { version = "0.5.7", path = "./crates/biome_css_analyze" }
biome_css_factory = { version = "0.5.7", path = "./crates/biome_css_factory" }
biome_css_formatter = { version = "0.5.7", path = "./crates/biome_css_formatter" }
biome_css_parser = { version = "0.5.7", path = "./crates/biome_css_parser" }
biome_css_syntax = { version = "0.5.7", path = "./crates/biome_css_syntax" }
biome_deserialize = { version = "0.5.7", path = "./crates/biome_deserialize" }
biome_deserialize_macros = { version = "0.5.7", path = "./crates/biome_deserialize_macros" }
biome_diagnostics = { version = "0.5.7", path = "./crates/biome_diagnostics" }
biome_diagnostics_categories = { version = "0.5.7", path = "./crates/biome_diagnostics_categories" }
biome_diagnostics_macros = { version = "0.5.7", path = "./crates/biome_diagnostics_macros" }
biome_formatter = { version = "0.5.7", path = "./crates/biome_formatter" }
biome_fs = { version = "0.5.7", path = "./crates/biome_fs" }
biome_graphql_factory = { version = "0.1.0", path = "./crates/biome_graphql_factory" }
biome_graphql_syntax = { version = "0.1.0", path = "./crates/biome_graphql_syntax" }
biome_grit_factory = { version = "0.5.7", path = "./crates/biome_grit_factory" }
biome_grit_parser = { version = "0.1.0", path = "./crates/biome_grit_parser" }
biome_grit_patterns = { version = "0.0.1", path = "./crates/biome_grit_patterns" }
biome_grit_syntax = { version = "0.5.7", path = "./crates/biome_grit_syntax" }
biome_html_factory = { version = "0.5.7", path = "./crates/biome_html_factory" }
biome_html_syntax = { version = "0.5.7", path = "./crates/biome_html_syntax" }
biome_js_analyze = { version = "0.5.7", path = "./crates/biome_js_analyze" }
biome_js_factory = { version = "0.5.7", path = "./crates/biome_js_factory" }
biome_js_formatter = { version = "0.5.7", path = "./crates/biome_js_formatter" }
biome_js_parser = { version = "0.5.7", path = "./crates/biome_js_parser" }
biome_js_semantic = { version = "0.5.7", path = "./crates/biome_js_semantic" }
biome_js_syntax = { version = "0.5.7", path = "./crates/biome_js_syntax" }
biome_json_analyze = { version = "0.5.7", path = "./crates/biome_json_analyze" }
biome_json_factory = { version = "0.5.7", path = "./crates/biome_json_factory" }
biome_json_formatter = { version = "0.5.7", path = "./crates/biome_json_formatter" }
biome_json_parser = { version = "0.5.7", path = "./crates/biome_json_parser" }
biome_json_syntax = { version = "0.5.7", path = "./crates/biome_json_syntax" }
biome_yaml_factory = { version = "0.0.1", path = "./crates/biome_yaml_factory" }
biome_yaml_parser = { version = "0.0.1", path = "./crates/biome_yaml_parser" }
biome_yaml_syntax = { version = "0.0.1", path = "./crates/biome_yaml_syntax" }
biome_diagnostics_macros = { version = "0.5.7", path = "./crates/biome_diagnostics_macros" }
biome_formatter = { version = "0.5.7", path = "./crates/biome_formatter" }
biome_fs = { version = "0.5.7", path = "./crates/biome_fs" }
biome_graphql_factory = { version = "0.1.0", path = "./crates/biome_graphql_factory" }
biome_graphql_syntax = { version = "0.1.0", path = "./crates/biome_graphql_syntax" }
biome_grit_factory = { version = "0.5.7", path = "./crates/biome_grit_factory" }
biome_grit_parser = { version = "0.1.0", path = "./crates/biome_grit_parser" }
biome_grit_patterns = { version = "0.0.1", path = "./crates/biome_grit_patterns" }
biome_grit_syntax = { version = "0.5.7", path = "./crates/biome_grit_syntax" }
biome_html_factory = { version = "0.5.7", path = "./crates/biome_html_factory" }
biome_html_syntax = { version = "0.5.7", path = "./crates/biome_html_syntax" }
biome_js_analyze = { version = "0.5.7", path = "./crates/biome_js_analyze" }
biome_js_factory = { version = "0.5.7", path = "./crates/biome_js_factory" }
biome_js_formatter = { version = "0.5.7", path = "./crates/biome_js_formatter" }
biome_js_parser = { version = "0.5.7", path = "./crates/biome_js_parser" }
biome_js_semantic = { version = "0.5.7", path = "./crates/biome_js_semantic" }
biome_js_syntax = { version = "0.5.7", path = "./crates/biome_js_syntax" }
biome_json_analyze = { version = "0.5.7", path = "./crates/biome_json_analyze" }
biome_json_factory = { version = "0.5.7", path = "./crates/biome_json_factory" }
biome_json_formatter = { version = "0.5.7", path = "./crates/biome_json_formatter" }
biome_json_parser = { version = "0.5.7", path = "./crates/biome_json_parser" }
biome_json_syntax = { version = "0.5.7", path = "./crates/biome_json_syntax" }
biome_yaml_factory = { version = "0.0.1", path = "./crates/biome_yaml_factory" }
biome_yaml_parser = { version = "0.0.1", path = "./crates/biome_yaml_parser" }
biome_yaml_syntax = { version = "0.0.1", path = "./crates/biome_yaml_syntax" }

biome_markup = { version = "0.5.7", path = "./crates/biome_markup" }
biome_parser = { version = "0.5.7", path = "./crates/biome_parser" }
biome_project = { version = "0.5.7", path = "./crates/biome_project" }
biome_rowan = { version = "0.5.7", path = "./crates/biome_rowan" }
biome_string_case = { version = "0.5.7", path = "./crates/biome_string_case" }
biome_suppression = { version = "0.5.7", path = "./crates/biome_suppression" }
biome_text_edit = { version = "0.5.7", path = "./crates/biome_text_edit" }
biome_text_size = { version = "0.5.7", path = "./crates/biome_text_size" }
biome_markup = { version = "0.5.7", path = "./crates/biome_markup" }
biome_parser = { version = "0.5.7", path = "./crates/biome_parser" }
biome_project = { version = "0.5.7", path = "./crates/biome_project" }
biome_rowan = { version = "0.5.7", path = "./crates/biome_rowan" }
biome_string_case = { version = "0.5.7", path = "./crates/biome_string_case" }
biome_suppression = { version = "0.5.7", path = "./crates/biome_suppression" }
biome_text_edit = { version = "0.5.7", path = "./crates/biome_text_edit" }
biome_text_size = { version = "0.5.7", path = "./crates/biome_text_size" }
biome_unicode_table = { version = "0.5.7", path = "./crates/biome_unicode_table" }

# not publish
biome_cli = { path = "./crates/biome_cli" }
biome_configuration = { path = "./crates/biome_configuration" }
biome_flags = { path = "./crates/biome_flags" }
biome_cli = { path = "./crates/biome_cli" }
biome_configuration = { path = "./crates/biome_configuration" }
biome_flags = { path = "./crates/biome_flags" }
biome_formatter_test = { path = "./crates/biome_formatter_test" }
biome_lsp = { path = "./crates/biome_lsp" }
biome_migrate = { path = "./crates/biome_migrate" }
biome_service = { path = "./crates/biome_service" }
biome_test_utils = { path = "./crates/biome_test_utils" }
biome_ungrammar = { path = "./crates/biome_ungrammar" }
tests_macros = { path = "./crates/tests_macros" }
biome_lsp = { path = "./crates/biome_lsp" }
biome_migrate = { path = "./crates/biome_migrate" }
biome_service = { path = "./crates/biome_service" }
biome_test_utils = { path = "./crates/biome_test_utils" }
biome_ungrammar = { path = "./crates/biome_ungrammar" }
tests_macros = { path = "./crates/tests_macros" }

# Crates needed in the workspace
bitflags = "2.5.0"
bpaf = { version = "0.9.9", features = ["derive"] }
countme = "3.0.1"
crossbeam = "0.8.4"
dashmap = "5.4.0"
ignore = "0.4.21"
indexmap = "1.9.3"
insta = "1.38.0"
lazy_static = "1.4.0"
oxc_resolver = "1.4.0"
proc-macro2 = "1.0.80"
quickcheck = "1.0.3"
quickcheck_macros = "1.0.0"
quote = "1.0.36"
rayon = "1.8.1"
regex = "1.10.4"
rustc-hash = "1.1.0"
schemars = { version = "0.8.12" }
serde = { version = "1.0.163", features = ["derive"] }
serde_json = "1.0.115"
similar = "2.5.0"
smallvec = { version = "1.10.0", features = ["union", "const_new"] }
syn = "1.0.109"
tokio = { version = "1.36.0" }
tracing = { version = "0.1.37", default-features = false, features = ["std"] }
bitflags = "2.5.0"
bpaf = { version = "0.9.9", features = ["derive"] }
countme = "3.0.1"
crossbeam = "0.8.4"
dashmap = "5.4.0"
ignore = "0.4.21"
indexmap = "1.9.3"
insta = "1.38.0"
lazy_static = "1.4.0"
oxc_resolver = "1.4.0"
proc-macro2 = "1.0.80"
quickcheck = "1.0.3"
quickcheck_macros = "1.0.0"
quote = "1.0.36"
rayon = "1.8.1"
regex = "1.10.4"
rustc-hash = "1.1.0"
schemars = { version = "0.8.12" }
serde = { version = "1.0.163", features = ["derive"] }
serde_json = "1.0.115"
similar = "2.5.0"
smallvec = { version = "1.10.0", features = ["union", "const_new"] }
syn = "1.0.109"
tokio = { version = "1.36.0" }
tracing = { version = "0.1.37", default-features = false, features = ["std"] }
tracing-subscriber = "0.3.18"
unicode-bom = "2.0.3"
unicode-bom = "2.0.3"
itertools = "0.12.1"

[profile.dev.package.biome_wasm]
debug = true
debug = true
opt-level = "s"

[profile.test.package.biome_wasm]
debug = true
debug = true
opt-level = "s"

[profile.release.package.biome_wasm]
debug = false
debug = false
opt-level = 3
32 changes: 16 additions & 16 deletions crates/biome_json_analyze/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
[package]
authors.workspace = true
authors.workspace = true
categories.workspace = true
description = "Biome's JSON linter"
edition.workspace = true
homepage.workspace = true
keywords.workspace = true
license.workspace = true
name = "biome_json_analyze"
description = "Biome's JSON linter"
edition.workspace = true
homepage.workspace = true
keywords.workspace = true
license.workspace = true
name = "biome_json_analyze"
repository.workspace = true
version = "0.5.7"
version = "0.5.7"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
biome_analyze = { workspace = true }
biome_console = { workspace = true }
biome_analyze = { workspace = true }
biome_console = { workspace = true }
biome_diagnostics = { workspace = true }
biome_json_syntax = { workspace = true }
biome_rowan = { workspace = true }
lazy_static = { workspace = true }
rustc-hash = { workspace = true }
biome_rowan = { workspace = true }
lazy_static = { workspace = true }
rustc-hash = { workspace = true }

[dev-dependencies]
biome_json_parser = { path = "../biome_json_parser" }
biome_test_utils = { path = "../biome_test_utils" }
insta = { workspace = true, features = ["glob"] }
tests_macros = { path = "../tests_macros" }
biome_test_utils = { path = "../biome_test_utils" }
insta = { workspace = true, features = ["glob"] }
tests_macros = { path = "../tests_macros" }

[lints]
workspace = true
Loading

0 comments on commit e523835

Please sign in to comment.