Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: vm.skip(true) #63

Merged
merged 19 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from 8 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
83 changes: 47 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ indexmap = "2.0.0"
once_cell = "1.18.0"
owo-colors = "3.5.0"
regex = "1.10.2"
serde = { version = "1.0.197", features = ["derive"] }
solang-parser = "0.3.2"
toml = "0.8.12"
unicode-xid = "0.2.4"
# Security patch
zerocopy = "0.7.31"
Expand Down
1 change: 1 addition & 0 deletions bulloak.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
no_skip = false
2 changes: 1 addition & 1 deletion src/check/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl Context {
pub(crate) fn new(tree: PathBuf) -> Result<Self, Violation> {
let tree_path_cow = tree.to_string_lossy();
let tree_contents = try_read_to_string(&tree)?;
let hir = crate::hir::translate(&tree_contents).map_err(|e| {
let hir = crate::hir::translate(&tree_contents, &false).map_err(|e| {
Violation::new(
ViolationKind::ParsingFailed(e),
Location::File(tree_path_cow.into_owned()),
Expand Down
3 changes: 2 additions & 1 deletion src/check/violation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ impl ViolationKind {
pub(crate) fn fix(&self, mut ctx: Context) -> Context {
match self {
ViolationKind::ContractMissing(_) => {
let pt = sol::Translator::new(INTERNAL_DEFAULT_SOL_VERSION).translate(&ctx.hir);
let pt =
sol::Translator::new(INTERNAL_DEFAULT_SOL_VERSION, &false).translate(&ctx.hir);
let source = sol::Formatter::new().emit(pt.clone());
let parsed = parse(&source).expect("should parse solidity string");
ctx.from_parsed(parsed)
Expand Down
Loading