Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ jobs:
cargo install cargo-license || true
cargo install cargo-modules || true
cargo install cargo-sort || true
# smoelius: Pin Clippy to nightly-2023-06-28 until the following is resolved:
# https://github.com/rust-lang/rust/pull/112628#issuecomment-1616750719
rustup toolchain install nightly-2023-06-28
rustup +nightly-2023-06-28 component add clippy

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand Down
18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ resolver = "2"

[workspace.metadata.dylint]
libraries = [
{ git = "https://github.com/trailofbits/dylint", pattern = "examples/general/*" },
{ git = "https://github.com/trailofbits/dylint", pattern = "examples/supplementary/*" },
{ git = "https://github.com/trailofbits/dylint", pattern = "examples/restriction/collapsible_unwrap" },
{ git = "https://github.com/trailofbits/dylint", pattern = "examples/restriction/const_path_join" },
{ git = "https://github.com/trailofbits/dylint", pattern = "examples/restriction/inconsistent_qualification" },
{ git = "https://github.com/trailofbits/dylint", pattern = "examples/restriction/misleading_variable_name" },
{ git = "https://github.com/trailofbits/dylint", pattern = "examples/general/*", rev = "120f750" },
{ git = "https://github.com/trailofbits/dylint", pattern = "examples/supplementary/*", rev = "120f750" },
{ git = "https://github.com/trailofbits/dylint", pattern = "examples/restriction/collapsible_unwrap", rev = "120f750" },
{ git = "https://github.com/trailofbits/dylint", pattern = "examples/restriction/const_path_join", rev = "120f750" },
{ git = "https://github.com/trailofbits/dylint", pattern = "examples/restriction/inconsistent_qualification", rev = "120f750" },
{ git = "https://github.com/trailofbits/dylint", pattern = "examples/restriction/misleading_variable_name", rev = "120f750" },
# { git = "https://github.com/trailofbits/dylint", pattern = "examples/restriction/missing_doc_comment_openai" },
{ git = "https://github.com/trailofbits/dylint", pattern = "examples/restriction/question_mark_in_expression" },
{ git = "https://github.com/trailofbits/dylint", pattern = "examples/restriction/ref_aware_redundant_closure_for_method_calls" },
{ git = "https://github.com/trailofbits/dylint", pattern = "examples/restriction/suboptimal_pattern" },
{ git = "https://github.com/trailofbits/dylint", pattern = "examples/restriction/question_mark_in_expression", rev = "120f750" },
{ git = "https://github.com/trailofbits/dylint", pattern = "examples/restriction/ref_aware_redundant_closure_for_method_calls", rev = "120f750" },
{ git = "https://github.com/trailofbits/dylint", pattern = "examples/restriction/suboptimal_pattern", rev = "120f750" },
]
4 changes: 2 additions & 2 deletions frameworks/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ where
writeln!(file, " => {{")?;
match fields {
Fields::Named(fields) => {
for field in fields.named.iter() {
for field in &fields.named {
writeln!(
file,
" {}.visit(visitor)?;",
Expand Down Expand Up @@ -234,7 +234,7 @@ where

match fields {
Fields::Named(fields) => {
for field in fields.named.iter() {
for field in &fields.named {
writeln!(
file,
" {}.{}.visit(visitor)?;",
Expand Down
2 changes: 1 addition & 1 deletion frameworks/src/foundry/visitor/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ where
where
V: Visitor<'ast> + ?Sized,
{
for item in self.iter() {
for item in self {
item.visit(v)?;
}
Ok(())
Expand Down
9 changes: 1 addition & 8 deletions necessist/tests/ci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,16 +279,9 @@ fn update() {

fn clippy_command(cargo_args: &[&str], rustc_args: &[&str]) -> Command {
// smoelius: The next command should match what's in scripts/clippy.sh.
// smoelius: Pin Clippy to nightly-2023-06-28 until the following is resolved:
// https://github.com/rust-lang/rust/pull/112628#issuecomment-1616750719
let mut command = Command::new("cargo");
command
.args([
"+nightly-2023-06-28",
"clippy",
"--all-features",
"--all-targets",
])
.args(["+nightly", "clippy", "--all-features", "--all-targets"])
.args(cargo_args)
.args(["--"])
.args(rustc_args)
Expand Down
2 changes: 1 addition & 1 deletion necessist/tests/trycmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fn trycmd() {

#[test]
fn check_stdout() {
let re = Regex::new(r#"\b[0-9]+\.[0-9]+s\b"#).unwrap();
let re = Regex::new(r"\b[0-9]+\.[0-9]+s\b").unwrap();

let necessist_db_absent = read_dir("tests/necessist_db_absent").unwrap();
let necessist_db_present = read_dir("tests/necessist_db_present").unwrap();
Expand Down