Skip to content

[SNOW-921048]Add linter action #11

[SNOW-921048]Add linter action

[SNOW-921048]Add linter action #11

Workflow file for this run

name: Code standards check
# Triggers the workflow on pull request events but only for the master branch
on:
pull_request:
branches: [ master ]
workflow_dispatch:
inputs:
logLevel:
default: warning
description: "Log level"
required: true
tags:
description: "Linter"
required: false
concurrency:
# older builds for the same pull request number or branch should be cancelled
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
DOTNET_VERSION: 6.0
DOTNET_LEGACY_VERSION: 4.7.1
jobs:
run-linter:
name: Run linter
runs-on: windows-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Set up .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x"
- name: Run linters
uses: wearerequired/lint-action@v2
env:
ALL_CHANGED_FILES: ${{git diff --name-only master}}

Check failure on line 40 in .github/workflows/linter.yml

View workflow run for this annotation

GitHub Actions / Code standards check

Invalid workflow file

The workflow is not valid. .github/workflows/linter.yml (Line: 40, Col: 30): Unrecognized named-value: 'git'. Located at position 1 within expression: git diff --name-only master .github/workflows/linter.yml (Line: 42, Col: 31): Unrecognized named-value: 'ALL_CHANGED_FILES'. Located at position 1 within expression: ALL_CHANGED_FILES
with:
dotnet_format_args: "--include ${{ALL_CHANGED_FILES}}"
dotnet_format: true
continue_on_error: false
github_token: ${{ secrets.GITHUB_TOKEN }}
check_name: ${linter} run