Skip to content

Commit 9230397

Browse files
authored
feat: adding tealer support (#3)
* feat: adding tealer support * chore: updating gitignore * chore: updating gitignore
1 parent b5cadcb commit 9230397

File tree

20 files changed

+150
-0
lines changed

20 files changed

+150
-0
lines changed

template_content/.gitignore.jinja

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,5 @@ node_modules
176176

177177
# AlgoKit
178178
debug_traces/
179+
180+
.algokit/static-analysis/tealer/

template_content/{% if ide_vscode %}.vscode{% endif %}/tasks.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,21 @@
5959
"cwd": "${workspaceFolder}"
6060
},
6161
"problemMatcher": []
62+
},
63+
{
64+
"label": "Analyze TEAL contracts with AlgoKit Tealer integration",
65+
"command": "algokit",
66+
"args": [
67+
"task",
68+
"analyze",
69+
"${workspaceFolder}/.algokit",
70+
"--recursive",
71+
"--force"
72+
],
73+
"options": {
74+
"cwd": "${workspaceFolder}"
75+
},
76+
"problemMatcher": []
6277
}
6378
]
6479
}

template_content/{% if use_github_actions %}.github{% endif %}/workflows/checks.yaml.jinja

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ jobs:
8383
- name: Build smart contracts
8484
run: poetry run python -m smart_contracts build
8585

86+
- name: Scan TEAL files for issues
87+
run: algokit task analyze .algokit --recursive --force # add --diff flag if you want output stability checks instead
88+
8689
- name: Check output stability of the smart contracts
8790
shell: bash
8891
run: |

template_content/{% if use_pre_commit %}.pre-commit-config.yaml{% endif %}.jinja

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,13 @@ repos:
3636
minimum_pre_commit_version: '2.9.2'
3737
files: '^(src|tests)/'
3838
{% endif %}
39+
- id: tealer
40+
name: tealer
41+
description: "Run AlgoKit `Tealer` for TEAL static analysis"
42+
entry: algokit
43+
language: system
44+
args: [task, analyze, ".algokit", "--recursive", "--force"]
45+
require_serial: false
46+
additional_dependencies: []
47+
minimum_pre_commit_version: "0"
48+
files: '^.*\.teal$'

tests_generated/test_smart_contract_generator_default_production_preset_python/.github/workflows/checks.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ jobs:
6767
- name: Build smart contracts
6868
run: poetry run python -m smart_contracts build
6969

70+
- name: Scan TEAL files for issues
71+
run: algokit task analyze .algokit --recursive --force # add --diff flag if you want output stability checks instead
72+
7073
- name: Check output stability of the smart contracts
7174
shell: bash
7275
run: |

tests_generated/test_smart_contract_generator_default_production_preset_python/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,5 @@ node_modules
176176

177177
# AlgoKit
178178
debug_traces/
179+
180+
.algokit/static-analysis/tealer/

tests_generated/test_smart_contract_generator_default_production_preset_python/.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,13 @@ repos:
3636
minimum_pre_commit_version: '2.9.2'
3737
files: '^(src|tests)/'
3838

39+
- id: tealer
40+
name: tealer
41+
description: "Run AlgoKit `Tealer` for TEAL static analysis"
42+
entry: algokit
43+
language: system
44+
args: [task, analyze, ".algokit", "--recursive", "--force"]
45+
require_serial: false
46+
additional_dependencies: []
47+
minimum_pre_commit_version: "0"
48+
files: '^.*\.teal$'

tests_generated/test_smart_contract_generator_default_production_preset_python/.vscode/tasks.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,21 @@
5959
"cwd": "${workspaceFolder}"
6060
},
6161
"problemMatcher": []
62+
},
63+
{
64+
"label": "Analyze TEAL contracts with AlgoKit Tealer integration",
65+
"command": "algokit",
66+
"args": [
67+
"task",
68+
"analyze",
69+
"${workspaceFolder}/.algokit",
70+
"--recursive",
71+
"--force"
72+
],
73+
"options": {
74+
"cwd": "${workspaceFolder}"
75+
},
76+
"problemMatcher": []
6277
}
6378
]
6479
}

tests_generated/test_smart_contract_generator_default_production_preset_typescript/.github/workflows/checks.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ jobs:
6161
- name: Build smart contracts
6262
run: poetry run python -m smart_contracts build
6363

64+
- name: Scan TEAL files for issues
65+
run: algokit task analyze .algokit --recursive --force # add --diff flag if you want output stability checks instead
66+
6467
- name: Check output stability of the smart contracts
6568
shell: bash
6669
run: |

tests_generated/test_smart_contract_generator_default_production_preset_typescript/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,5 @@ node_modules
176176

177177
# AlgoKit
178178
debug_traces/
179+
180+
.algokit/static-analysis/tealer/

tests_generated/test_smart_contract_generator_default_production_preset_typescript/.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,13 @@ repos:
3636
minimum_pre_commit_version: '2.9.2'
3737
files: '^(src|tests)/'
3838

39+
- id: tealer
40+
name: tealer
41+
description: "Run AlgoKit `Tealer` for TEAL static analysis"
42+
entry: algokit
43+
language: system
44+
args: [task, analyze, ".algokit", "--recursive", "--force"]
45+
require_serial: false
46+
additional_dependencies: []
47+
minimum_pre_commit_version: "0"
48+
files: '^.*\.teal$'

tests_generated/test_smart_contract_generator_default_production_preset_typescript/.vscode/tasks.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,21 @@
5959
"cwd": "${workspaceFolder}"
6060
},
6161
"problemMatcher": []
62+
},
63+
{
64+
"label": "Analyze TEAL contracts with AlgoKit Tealer integration",
65+
"command": "algokit",
66+
"args": [
67+
"task",
68+
"analyze",
69+
"${workspaceFolder}/.algokit",
70+
"--recursive",
71+
"--force"
72+
],
73+
"options": {
74+
"cwd": "${workspaceFolder}"
75+
},
76+
"problemMatcher": []
6277
}
6378
]
6479
}

tests_generated/test_smart_contract_generator_default_starter_preset_python/.github/workflows/checks.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ jobs:
6767
- name: Build smart contracts
6868
run: poetry run python -m smart_contracts build
6969

70+
- name: Scan TEAL files for issues
71+
run: algokit task analyze .algokit --recursive --force # add --diff flag if you want output stability checks instead
72+
7073
- name: Check output stability of the smart contracts
7174
shell: bash
7275
run: |

tests_generated/test_smart_contract_generator_default_starter_preset_python/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,5 @@ node_modules
176176

177177
# AlgoKit
178178
debug_traces/
179+
180+
.algokit/static-analysis/tealer/

tests_generated/test_smart_contract_generator_default_starter_preset_python/.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,13 @@ repos:
3636
minimum_pre_commit_version: '2.9.2'
3737
files: '^(src|tests)/'
3838

39+
- id: tealer
40+
name: tealer
41+
description: "Run AlgoKit `Tealer` for TEAL static analysis"
42+
entry: algokit
43+
language: system
44+
args: [task, analyze, ".algokit", "--recursive", "--force"]
45+
require_serial: false
46+
additional_dependencies: []
47+
minimum_pre_commit_version: "0"
48+
files: '^.*\.teal$'

tests_generated/test_smart_contract_generator_default_starter_preset_python/.vscode/tasks.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,21 @@
5959
"cwd": "${workspaceFolder}"
6060
},
6161
"problemMatcher": []
62+
},
63+
{
64+
"label": "Analyze TEAL contracts with AlgoKit Tealer integration",
65+
"command": "algokit",
66+
"args": [
67+
"task",
68+
"analyze",
69+
"${workspaceFolder}/.algokit",
70+
"--recursive",
71+
"--force"
72+
],
73+
"options": {
74+
"cwd": "${workspaceFolder}"
75+
},
76+
"problemMatcher": []
6277
}
6378
]
6479
}

tests_generated/test_smart_contract_generator_default_starter_preset_typescript/.github/workflows/checks.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ jobs:
6161
- name: Build smart contracts
6262
run: poetry run python -m smart_contracts build
6363

64+
- name: Scan TEAL files for issues
65+
run: algokit task analyze .algokit --recursive --force # add --diff flag if you want output stability checks instead
66+
6467
- name: Check output stability of the smart contracts
6568
shell: bash
6669
run: |

tests_generated/test_smart_contract_generator_default_starter_preset_typescript/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,5 @@ node_modules
176176

177177
# AlgoKit
178178
debug_traces/
179+
180+
.algokit/static-analysis/tealer/

tests_generated/test_smart_contract_generator_default_starter_preset_typescript/.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,13 @@ repos:
3636
minimum_pre_commit_version: '2.9.2'
3737
files: '^(src|tests)/'
3838

39+
- id: tealer
40+
name: tealer
41+
description: "Run AlgoKit `Tealer` for TEAL static analysis"
42+
entry: algokit
43+
language: system
44+
args: [task, analyze, ".algokit", "--recursive", "--force"]
45+
require_serial: false
46+
additional_dependencies: []
47+
minimum_pre_commit_version: "0"
48+
files: '^.*\.teal$'

tests_generated/test_smart_contract_generator_default_starter_preset_typescript/.vscode/tasks.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,21 @@
5959
"cwd": "${workspaceFolder}"
6060
},
6161
"problemMatcher": []
62+
},
63+
{
64+
"label": "Analyze TEAL contracts with AlgoKit Tealer integration",
65+
"command": "algokit",
66+
"args": [
67+
"task",
68+
"analyze",
69+
"${workspaceFolder}/.algokit",
70+
"--recursive",
71+
"--force"
72+
],
73+
"options": {
74+
"cwd": "${workspaceFolder}"
75+
},
76+
"problemMatcher": []
6277
}
6378
]
6479
}

0 commit comments

Comments
 (0)