mirror of
https://github.com/powdr-labs/powdr.git
synced 2026-01-09 17:48:21 -05:00
Introduce workspace-level lints (#2166)
Reduce the cost of adding a lint from O(#workspace_crates) to 1.
This commit is contained in:
committed by
GitHub
parent
23e92a0882
commit
c0fefae3e7
@@ -81,3 +81,7 @@ codegen-units = 256
|
||||
[profile.release-with-debug]
|
||||
inherits = "release"
|
||||
debug = true
|
||||
|
||||
[workspace.lints.clippy]
|
||||
print_stdout = "deny"
|
||||
uninlined_format_args = "deny"
|
||||
@@ -16,5 +16,5 @@ log = "0.4.17"
|
||||
|
||||
itertools = "0.13"
|
||||
|
||||
[lints.clippy]
|
||||
uninlined_format_args = "deny"
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
//! Compilation from powdr machines to AIRs
|
||||
|
||||
#![deny(clippy::print_stdout)]
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use powdr_ast::{
|
||||
|
||||
@@ -26,5 +26,5 @@ env_logger = "0.10.0"
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
development = ["env_logger"]
|
||||
|
||||
[lints.clippy]
|
||||
uninlined_format_args = "deny"
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#![deny(clippy::print_stdout)]
|
||||
|
||||
pub mod machine_check;
|
||||
mod vm;
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#![deny(clippy::print_stdout)]
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use powdr_ast::{
|
||||
|
||||
@@ -21,5 +21,5 @@ pretty_assertions = "1.4.0"
|
||||
powdr-analysis = { path = "../analysis" }
|
||||
powdr-importer = { path = "../importer" }
|
||||
|
||||
[lints.clippy]
|
||||
uninlined_format_args = "deny"
|
||||
[lints]
|
||||
workspace = true
|
||||
@@ -1,5 +1,3 @@
|
||||
#![deny(clippy::print_stdout)]
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use powdr_ast::asm_analysis::{AnalysisASMFile, Module, StatementReference, SubmachineDeclaration};
|
||||
|
||||
@@ -26,5 +26,5 @@ powdr-pil-analyzer.workspace = true
|
||||
powdr-parser.workspace = true
|
||||
|
||||
|
||||
[lints.clippy]
|
||||
uninlined_format_args = "deny"
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#![deny(clippy::print_stdout)]
|
||||
|
||||
use itertools::Itertools;
|
||||
use std::fmt::{Display, Result, Write};
|
||||
|
||||
|
||||
@@ -87,5 +87,5 @@ powdr-pipeline.workspace = true
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
development = ["env_logger"]
|
||||
|
||||
[lints.clippy]
|
||||
uninlined_format_args = "deny"
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#![deny(clippy::print_stdout)]
|
||||
|
||||
use std::io;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#![deny(clippy::print_stdout)]
|
||||
|
||||
#[cfg(any(feature = "estark-polygon", feature = "estark-starky"))]
|
||||
mod estark;
|
||||
#[cfg(feature = "halo2")]
|
||||
|
||||
@@ -33,5 +33,5 @@ pretty_assertions = "1.4.0"
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
development = ["env_logger"]
|
||||
|
||||
[lints.clippy]
|
||||
uninlined_format_args = "deny"
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
//! Tooling used for execution of compiled programs
|
||||
|
||||
#![deny(clippy::print_stdout)]
|
||||
|
||||
use powdr_ast::analyzed::Identity;
|
||||
|
||||
pub mod constant_evaluator;
|
||||
|
||||
@@ -15,5 +15,5 @@ powdr-parser-util.workspace = true
|
||||
|
||||
pretty_assertions = "1.4.0"
|
||||
|
||||
[lints.clippy]
|
||||
uninlined_format_args = "deny"
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#![deny(clippy::print_stdout)]
|
||||
|
||||
mod module_loader;
|
||||
mod path_canonicalizer;
|
||||
mod powdr_std;
|
||||
|
||||
@@ -23,5 +23,5 @@ powdr-pil-analyzer.workspace = true
|
||||
pretty_assertions = "1.4.0"
|
||||
test-log = "0.2.12"
|
||||
|
||||
[lints.clippy]
|
||||
uninlined_format_args = "deny"
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -140,7 +140,6 @@ fn degree_builtin() {
|
||||
let a: int -> int = |i| std::prover::degree();
|
||||
"#;
|
||||
let compiled_pil = compile(input, &["main::a"]);
|
||||
println!("Calling set degree outside");
|
||||
compiled_pil.set_degree(128);
|
||||
|
||||
let a = compiled_pil.get_fixed_column("main::a").unwrap();
|
||||
|
||||
@@ -24,5 +24,5 @@ powdr-airgen.workspace = true
|
||||
powdr-importer.workspace = true
|
||||
powdr-parser.workspace = true
|
||||
|
||||
[lints.clippy]
|
||||
uninlined_format_args = "deny"
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#![deny(clippy::print_stdout)]
|
||||
|
||||
use powdr_analysis::utils::parse_pil_statement;
|
||||
use powdr_ast::{
|
||||
asm_analysis::{combine_flags, MachineDegree},
|
||||
|
||||
@@ -38,5 +38,5 @@ env_logger = "0.10.0"
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
development = ["env_logger"]
|
||||
|
||||
[lints.clippy]
|
||||
uninlined_format_args = "deny"
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
//! Numerical types used across powdr
|
||||
|
||||
#![deny(clippy::print_stdout)]
|
||||
|
||||
#[macro_use]
|
||||
mod macros;
|
||||
mod baby_bear;
|
||||
|
||||
@@ -23,5 +23,5 @@ env_logger = "0.10.0"
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
development = ["env_logger"]
|
||||
|
||||
[lints.clippy]
|
||||
uninlined_format_args = "deny"
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
//! Utils used with different lalrpop parsers
|
||||
|
||||
#![deny(clippy::print_stdout)]
|
||||
|
||||
use std::{
|
||||
fmt::{self, Debug, Formatter},
|
||||
hash::Hash,
|
||||
|
||||
@@ -31,5 +31,5 @@ lalrpop = "^0.19"
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
development = ["env_logger"]
|
||||
|
||||
[lints.clippy]
|
||||
uninlined_format_args = "deny"
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
//! Parser for powdr assembly and PIL
|
||||
|
||||
#![deny(clippy::print_stdout)]
|
||||
|
||||
use lalrpop_util::*;
|
||||
use powdr_ast::parsed::{
|
||||
asm::ASMProgram,
|
||||
|
||||
@@ -25,5 +25,5 @@ pretty_assertions = "1.4.0"
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
development = ["env_logger"]
|
||||
|
||||
[lints.clippy]
|
||||
uninlined_format_args = "deny"
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#![deny(clippy::print_stdout)]
|
||||
|
||||
mod call_graph;
|
||||
mod condenser;
|
||||
pub mod evaluator;
|
||||
|
||||
@@ -18,5 +18,5 @@ itertools = "0.13.0"
|
||||
[dev-dependencies]
|
||||
powdr-pil-analyzer.workspace = true
|
||||
|
||||
[lints.clippy]
|
||||
uninlined_format_args = "deny"
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
//! PIL-based optimizer
|
||||
#![deny(clippy::print_stdout)]
|
||||
|
||||
use std::cmp::Ordering;
|
||||
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
|
||||
|
||||
@@ -61,5 +61,5 @@ walkdir = "2.4.0"
|
||||
name = "evaluator_benchmark"
|
||||
harness = false
|
||||
|
||||
[lints.clippy]
|
||||
uninlined_format_args = "deny"
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
//! The main powdr lib, used to compile from assembly to PIL
|
||||
|
||||
#![deny(clippy::print_stdout)]
|
||||
|
||||
pub mod pipeline;
|
||||
pub mod test_runner;
|
||||
pub mod test_util;
|
||||
|
||||
@@ -13,5 +13,5 @@ powdr.workspace = true
|
||||
[dev-dependencies]
|
||||
env_logger = "0.10.2"
|
||||
|
||||
[lints.clippy]
|
||||
uninlined_format_args = "deny"
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -9,5 +9,5 @@ repository = { workspace = true }
|
||||
|
||||
[dependencies]
|
||||
|
||||
[lints.clippy]
|
||||
uninlined_format_args = "deny"
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -65,5 +65,5 @@ development = ["env_logger"]
|
||||
name = "executor_benchmark"
|
||||
harness = false
|
||||
|
||||
[lints.clippy]
|
||||
uninlined_format_args = "deny"
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
//! A RISC-V frontend for powdr
|
||||
#![deny(clippy::print_stdout)]
|
||||
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
|
||||
Reference in New Issue
Block a user