Add Github Action Super Linter (#7637)
This uses the templates from https://github.com/github/super-linter/tree/master/TEMPLATES currently. A future PR can add the necessary templates to the Windows Terminal repository and update the source of Templates following the README. Additionally we can add flags to explicitly choose the linters applicable to this code base but is not necessary. Per the README, this does not enforce any linting rules but rather outputs the suggestions in the build step, which are to be read by the PR submitter and Windows Terminal team to determine if they want to use the linting rule. C++ is currently not supported (Powershell, Json, Yaml, and Markdown will be the only things the linter checks for currently) but we could add our own custom support if desired in separate PR. ## Validation Steps Performed It successfully runs. Currently only shows the yaml file itself being linted in this PR as a test case. It will apply to new PRs once this is merged. We can lint existing code base but would require a separate PR and examining the code output (also requires updating the yaml file temporarily). Closes #7513
This commit is contained in:
parent
33321b8596
commit
afcc930119
49
.github/workflows/linter.yml
vendored
Normal file
49
.github/workflows/linter.yml
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
---
|
||||
###########################
|
||||
###########################
|
||||
## Linter GitHub Actions ##
|
||||
###########################
|
||||
###########################
|
||||
name: Lint Code Base
|
||||
|
||||
#
|
||||
# Documentation:
|
||||
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
||||
#
|
||||
|
||||
#############################
|
||||
# Start the job on all push #
|
||||
#############################
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
###############
|
||||
# Set the Job #
|
||||
###############
|
||||
jobs:
|
||||
build:
|
||||
# Name the Job
|
||||
name: Lint Code Base
|
||||
# Set the agent to run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
##################
|
||||
# Load all steps #
|
||||
##################
|
||||
steps:
|
||||
##########################
|
||||
# Checkout the code base #
|
||||
##########################
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
################################
|
||||
# Run Linter against code base #
|
||||
################################
|
||||
- name: Lint Code Base
|
||||
uses: github/super-linter@v3.10.0
|
||||
env:
|
||||
VALIDATE_ALL_CODEBASE: false
|
||||
DEFAULT_BRANCH: master
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
Loading…
Reference in a new issue