# Copyright (c) 2020-2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Lint Code Base
on:
    push:
    pull_request:
    workflow_dispatch:

concurrency:
    group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
    cancel-in-progress: true

jobs:
    code-lints:
        runs-on: ubuntu-latest
        if: github.actor != 'restyled-io[bot]'

        steps:
            - uses: Wandalen/wretry.action@v1.0.11
              name: Checkout
              with:
                  action: actions/checkout@v3
                  with: |
                      token: ${{ github.token }}
                  attempt_limit: 3
                  attempt_delay: 2000

            - name: Check broken links
              # On-push disabled until the job can run fully green
              # At that point the step should be enabled.
              if: github.event_name == 'workflow_dispatch'
              uses: gaurav-nelson/github-action-markdown-link-check@v1

            # git grep exits with 0 if it finds a match, but we want
            # to fail (exit nonzero) on match.  And we wasnt to exclude this file,
            # to avoid our grep regexp matching itself.
            - name: Check for incorrect error use in VerifyOrExit
              if: always()
              run: |
                  git grep -n "VerifyOrExit(.*, [A-Za-z]*_ERROR" -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0

            # git grep exits with 0 if it finds a match, but we want
            # to fail (exit nonzero) on match.  And we wasnt to exclude this file,
            # to avoid our grep regexp matching itself.
            - name: Check for use of PRI*8, which are not supported on some libcs.
              if: always()
              run: |
                  git grep -n "PRI.8" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0

            # Comments like '{{! ... }}' should be used in zap files
            - name: Do not allow TODO in generated files
              if: always()
              run: |
                  git grep -n 'TODO:' -- ./zzz_generated './*/zap-generated/*' && exit 1 || exit 0

            - name: Check for disallowed include files
              if: always()
              run: scripts/tools/check_includes.sh

            - name: Ensure all PICS are set for tests (to true or false)
              if: always()
              run: |
                  scripts/tools/check_test_pics.py src/app/tests/suites/certification/ci-pics-values src/app/tests/suites/certification/PICS.yaml
