Rupert Swarbrick | 746f9b1 | 2021-03-26 17:19:00 +0000 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | # Copyright lowRISC contributors. |
| 3 | # Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| 4 | # SPDX-License-Identifier: Apache-2.0 |
| 5 | |
| 6 | # Run mypy to do Python linting on code that uses it |
| 7 | |
| 8 | set -e |
| 9 | |
| 10 | dirs_with_lint_makefile=( |
| 11 | hw/ip/otbn/dv/rig |
| 12 | hw/ip/otbn/dv/otbnsim |
| 13 | hw/ip/otbn/util |
| 14 | ) |
| 15 | |
| 16 | retcode=0 |
| 17 | for dir in "${dirs_with_lint_makefile[@]}"; do |
| 18 | make -C "$dir" lint || { |
| 19 | echo -n "##vso[task.logissue type=error]" |
| 20 | echo "Failed mypy check in ${dir}." |
| 21 | retcode=1 |
| 22 | } |
| 23 | done |
| 24 | |
| 25 | exit $retcode |