blob: be388761dc2156b368e6a34963829aedb2718198 [file] [log] [blame]
Rupert Swarbrick746f9b12021-03-26 17:19:00 +00001#!/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
8set -e
9
10dirs_with_lint_makefile=(
11 hw/ip/otbn/dv/rig
12 hw/ip/otbn/dv/otbnsim
13 hw/ip/otbn/util
Rupert Swarbrick4366c822021-03-24 07:44:43 +000014 hw/ip/rom_ctrl/util
Rupert Swarbrick0f6eeaf2021-05-28 15:24:14 +010015 util/reggen
Rupert Swarbrick746f9b12021-03-26 17:19:00 +000016)
17
18retcode=0
19for 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 }
25done
26
27exit $retcode