From 2d7f8a9204bfc9e5affaa14a1501b15618c29ac4 Mon Sep 17 00:00:00 2001 From: Nils Wistoff Date: Sat, 1 Jul 2023 15:50:18 +0200 Subject: [PATCH] CI: Lint sources Signed-off-by: Nils Wistoff --- .github/verible-lint-matcher.json | 20 ++++++++++++++++++++ .github/workflows/lint.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .github/verible-lint-matcher.json create mode 100644 .github/workflows/lint.yml diff --git a/.github/verible-lint-matcher.json b/.github/verible-lint-matcher.json new file mode 100644 index 0000000..b674a32 --- /dev/null +++ b/.github/verible-lint-matcher.json @@ -0,0 +1,20 @@ +// Copyright 2023 ETH Zurich and University of Bologna. +// Licensed under the Apache License, Version 2.0, see LICENSE for details. +// SPDX-License-Identifier: Apache-2.0 + +{ + "problemMatcher": [ + { + "owner": "verible-lint-matcher", + "pattern": [ + { + "regexp": "^(.+):(\\d+):(\\d+):\\s(.+)$", + "file": 1, + "line": 2, + "column": 3, + "message": 4 + } + ] + } + ] +} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..8dc70c0 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,26 @@ +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + +name: lint +on: [ push, pull_request, workflow_dispatch ] + +jobs: + ################ + # Verible Lint # + ################ + verilog: + name: Verilog Sources + # This job runs on Linux (fixed ubuntu version) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: chipsalliance/verible-linter-action@main + with: + paths: | + ./src + exclude_paths: | + ./src/deprecated + extra_args: "--rules=-interface-name-style --lint_fatal" + github_token: ${{ secrets.GITHUB_TOKEN }} + reviewdog_reporter: github-check