Skip to content

Commit

Permalink
fix: interfaces are sometimes included in the output (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
gas1cent authored Apr 4, 2024
1 parent b8fade5 commit 507b6e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ export async function getSourceUnits(rootPath: string, contractsDirectories: str
includePath: [rootPath],
});

const sourceUnits = new ASTReader().read(compiledFiles.data, ASTKind.Any, compiledFiles.files);
const sourceUnits = new ASTReader().read(compiledFiles.data, ASTKind.Any, compiledFiles.files)
// Skip source units that are not in the contracts directories
.filter((sourceUnit) => contractsDirectories.some((directory) => sourceUnit.absolutePath.includes(directory)));

return sourceUnits;
}
Expand Down

0 comments on commit 507b6e2

Please sign in to comment.