Skip to content

Commit

Permalink
Lint all files on Super Linter upgrade (#1276)
Browse files Browse the repository at this point in the history
* Lint all files on Super Linter upgrade

* Fix version
  • Loading branch information
tunetheweb authored and sudheendrachari committed Sep 15, 2020
1 parent 69d0fdc commit 0492830
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,8 @@
## Linter GitHub Actions ##
###########################
#
# Documentation:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
# Documentation: https://github.com/github/super-linter/
#
# For the Web Almanac we have the following rule changes from the defaults:
# * Markdown - we're a bit more relaxed about this since authors may be less technical
# * Python - Only change from default is to set ignored-modules=flask, flask-talisman...etc.
# * CSS - Tweaked to ignore some Prince/Normalise exceptions and some whitespace exceptions
# * JS - default rules
# * JSON - default rules
# * YML - default rules
# Exception config files are in the .github/linters directory
#
name: Lint Code Base
Expand All @@ -23,13 +15,20 @@ jobs:
lint:
name: Lint Code Base
# Skip duplicate job for local branches
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
# except for linter upgrades (so it can be caught by below check to lint all)
if: |
github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name != github.repository ||
startsWith(github.event.pull_request.title,'Bump github/super-linter')
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/[email protected]
- name: Set VALIDATE_ALL_CODEBASE variable
if: github.event_name == 'push' || github.event_name == 'pull_request'
- name: Set VALIDATE_ALL_CODEBASE variable to false
# Only run the full workflow for manual runs or if upgrading the super linter
if: |
github.event_name != 'workflow' &&
startsWith(github.event.pull_request.title,'Bump github/super-linter') != true
run: |
echo "::set-env name=VALIDATE_ALL_CODEBASE::false"
- name: Lint Code Base
Expand Down

0 comments on commit 0492830

Please sign in to comment.