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

[TT-1435] slither diff chatgpt test #14111

Closed
Closed
Changes from 1 commit
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
Next Next commit
use exit instead of return
Tofel committed Aug 14, 2024
commit 51a202b5606d21353081f247d1dd3549fa512c07
4 changes: 2 additions & 2 deletions contracts/scripts/ci/find_slither_report_diff.sh
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ openai_result=$(echo '{
# throw error openai_result when is not 200
if [ "$openai_result" != '200' ]; then
echo "::error::OpenAI API call failed with status $openai_result: $(cat prompt_response.json)"
return 1
exit 1
fi

# replace lines starting with ' -' (1space) with ' -' (2spaces)
@@ -80,7 +80,7 @@ if [[ -n "$validation_prompt_path" ]]; then
# throw error openai_result when is not 200
if [ "$validation_result" != '200' ]; then
echo "::error::OpenAI API call failed with status $validation_result: $(cat prompt_validation_response.json)"
return 1
exit 1
fi

# replace lines starting with ' -' (1space) with ' -' (2spaces)

Unchanged files with check annotations Beta

await reset()
})
for (let libType of ['Internal', 'External']) {

Check warning on line 43 in contracts/test/v0.8/Cron.test.ts

GitHub Actions / Solidity Lint

'libType' is never reassigned. Use 'const' instead
describe(libType, () => {
beforeEach(() => {
cron = libType === 'Internal' ? cronInternal : cronExternal
let arbRegistry: IAutomationRegistry // arbitrum registry
let opRegistry: IAutomationRegistry // optimism registry
let mgRegistry: IAutomationRegistry // "migrate registry" used in migration tests
let blankRegistry: IAutomationRegistry // used to test initial configurations

Check warning on line 168 in contracts/test/v0.8/automation/AutomationRegistry2_3.test.ts

GitHub Actions / Solidity Lint

'blankRegistry' is assigned a value but never used. Allowed unused vars must match /^_/u
let mockArbGasInfo: MockArbGasInfo
let mockOVMGasPriceOracle: MockOVMGasPriceOracle
let mock: UpkeepMock
let afUpkeepId: BigNumber // auto funding upkeep
let logUpkeepId: BigNumber // log trigger upkeepID
let streamsLookupUpkeepId: BigNumber // streams lookup upkeep
const numUpkeeps = 4 // see above

Check warning on line 405 in contracts/test/v0.8/automation/AutomationRegistry2_3.test.ts

GitHub Actions / Solidity Lint

'numUpkeeps' is assigned a value but never used. Allowed unused vars must match /^_/u
let keeperAddresses: string[]
let payees: string[]
let signers: Wallet[]
})
it('Should revert if any of the addresses are empty', async () => {
let tx = bm

Check warning on line 281 in contracts/test/v0.8/automation/ERC20BalanceMonitor.test.ts

GitHub Actions / Solidity Lint

'tx' is never reassigned. Use 'const' instead
.connect(owner)
.setWatchList(
[watchAddress1, ethers.constants.AddressZero],
})
it('Should revert if any of the addresses are empty', async () => {
let tx = bm

Check warning on line 269 in contracts/test/v0.8/automation/EthBalanceMonitor.test.ts

GitHub Actions / Solidity Lint

'tx' is never reassigned. Use 'const' instead
.connect(owner)
.setWatchList(
[watchAddress1, ethers.constants.AddressZero],
}
before(async () => {
// @ts-ignore bug in autogen file

Check warning on line 124 in contracts/test/v0.8/automation/UpkeepTranscoder3_0.test.ts

GitHub Actions / Solidity Lint

Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free
upkeepTranscoderFactory = await ethers.getContractFactory(
'UpkeepTranscoder3_0',
)
linkEthFeed: any,
) {
const mock = await upkeepMockFactory.deploy()
// @ts-ignore bug in autogen file

Check warning on line 166 in contracts/test/v0.8/automation/UpkeepTranscoder3_0.test.ts

GitHub Actions / Solidity Lint

Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free
const keeperRegistryFactory =
await ethers.getContractFactory('KeeperRegistry1_2')
transcoder = await upkeepTranscoderFactory.connect(owner).deploy()
linkEthFeed: any,
) {
const mock = await upkeepMockFactory.deploy()
// @ts-ignore bug in autogen file

Check warning on line 204 in contracts/test/v0.8/automation/UpkeepTranscoder3_0.test.ts

GitHub Actions / Solidity Lint

Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free
keeperRegistryFactory13 = await ethers.getContractFactory('KeeperRegistry1_3')
// @ts-ignore bug in autogen file

Check warning on line 206 in contracts/test/v0.8/automation/UpkeepTranscoder3_0.test.ts

GitHub Actions / Solidity Lint

Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free
keeperRegistryLogicFactory13 = await ethers.getContractFactory(
'KeeperRegistryLogic1_3',
)
gasPriceFeed: any,
linkEthFeed: any,
) {
// @ts-ignore bug in autogen file

Check warning on line 255 in contracts/test/v0.8/automation/UpkeepTranscoder3_0.test.ts

GitHub Actions / Solidity Lint

Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free
keeperRegistryFactory20 = await ethers.getContractFactory('KeeperRegistry2_0')
// @ts-ignore bug in autogen file
keeperRegistryLogicFactory20 = await ethers.getContractFactory(