Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix terrascan #534

Closed
wants to merge 2 commits into from
Closed
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
10 changes: 9 additions & 1 deletion linters/terrascan/terrascan.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
import { linterCheckTest } from "tests";
import { TrunkLintDriver } from "tests/driver";

linterCheckTest({ linterName: "terrascan" });
// NOTE(Tyler): Terrascan will sometimes fail due to a git error:
// "failed to fetch references from git repo. error: 'some refs were not updated'"
// Add a remote in order to avoid this error.
const preCheck = async (driver: TrunkLintDriver) => {
await driver.gitDriver?.addRemote("origin", driver.getSandbox());
};

linterCheckTest({ linterName: "terrascan", preCheck });
Loading