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 |
Rupert Swarbrick | 4366c82 | 2021-03-24 07:44:43 +0000 | [diff] [blame] | 14 | hw/ip/rom_ctrl/util |
Rupert Swarbrick | 0f6eeaf | 2021-05-28 15:24:14 +0100 | [diff] [blame] | 15 | util/reggen |
Rupert Swarbrick | 746f9b1 | 2021-03-26 17:19:00 +0000 | [diff] [blame] | 16 | ) |
| 17 | |
| 18 | retcode=0 |
| 19 | for dir in "${dirs_with_lint_makefile[@]}"; do |
| 20 | make -C "$dir" lint || { |
| 21 | echo -n "##vso[task.logissue type=error]" |
| 22 | echo "Failed mypy check in ${dir}." |
| 23 | retcode=1 |
| 24 | } |
| 25 | done |
| 26 | |
| 27 | exit $retcode |