# Copyright 2023 Thales DIS
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

name: Verible
on:
  pull_request:

jobs:
  format:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: chipsalliance/verible-formatter-action@main
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          verible_version: v0.0-4084-gf3e4d98b
          files: '$(find core -regex ".*\.\(v\|sv\)$" | grep -v "^core/include/.*_config_pkg\.sv$")'
          fail_on_formatting_suggestions: true
      - name: CVA6Cfg's XLEN attribute usage verificatory script
        if: always()
        run: |
          chmod +x util/sanitize/systemverilog/xlen_misuse.sh
          util/sanitize/systemverilog/xlen_misuse.sh
