blob: 8a319521e06368bd6ecc833422a5f31dd4b04ea4 [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
14)
15
16retcode=0
17for 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 }
23done
24
25exit $retcode