Skip to content

Commit

Permalink
Configure clippy for dbg_macro and MSRV (#47)
Browse files Browse the repository at this point in the history
* Add MSRV to clippy.toml

This is probably not as good as checking compilation with
the MSRV rustc. It can't check dependencies. But it will probably
prevent using new features in this repo.

* Enable clippy::dbg_macro to catch dbg! in release builds
  • Loading branch information
jlapeyre authored Jan 18, 2024
1 parent 8d761d2 commit fa4a97e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
- name: Build
run: cargo build --release --verbose
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
run: cargo clippy --all-targets -- -D warnings -D clippy::dbg_macro
- name: Run tests
run: cargo test --verbose -- --skip sourcegen_ast --skip sourcegen_ast_nodes
2 changes: 2 additions & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# This does not work for some reason.
# filter-map-identitiy = false

msrv = "1.70.0"
1 change: 1 addition & 0 deletions crates/oq3_semantics/examples/semdemo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ fn main() {
result.program().print_asg_debug();
}

#[allow(clippy::dbg_macro)]
Some(Commands::Semantic { file_name }) => {
let result = syntax_to_semantics::parse_source_file(file_name);
let have_errors = result.any_errors();
Expand Down
2 changes: 1 addition & 1 deletion local_CI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@

cargo fmt --all -- --check || exit 1
cargo build --release --verbose || exit 1
cargo clippy --all-targets -- -D warnings || exit 1
cargo clippy --all-targets -- -D warnings -D clippy::dbg_macro || exit 1
cargo test --verbose -- --skip sourcegen_ast --skip sourcegen_ast_nodes || exit 1

0 comments on commit fa4a97e

Please sign in to comment.