Merge branch 'master' into addEditorconfigChecker

This commit is contained in:
Zack Koppert 2020-07-06 08:19:23 -07:00 committed by GitHub
commit 2bf3e5a8f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 1139 additions and 76 deletions

View file

@ -0,0 +1,13 @@
# ARM Test Cases
This folder holds the test cases for **Azure Resource Manager (ARM)**.
## Additional Docs
No Additional information is needed for this test case.
## Good Test Cases
The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted.
- **Note:** They are linted utilizing the default linter rules.
## Bad Test Cases
The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted.
- **Note:** They are linted utilizing the default linter rules.

View file

@ -0,0 +1,53 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "",
"parameters": {
"Network.Config": {
"type": "object",
"metadata": {
"description": "Properties object for the Virtual Network"
}
}
},
"variables": {
"Network.Name": "[parameters('Network.Config').name]",
"Network.Location": "[parameters('Network.Config').location]",
"Network.Tags": "[parameters('Network.Config').tags]",
"Network.Properties.AddressSpace.AddressPrefixes": "[parameters('Network.Config').addressPrefixes]",
"Network.Properties.DhcpOptions.DnsServers": "[parameters('Network.Config').dnsServers]",
"copy": [
{
"name": "Network.Properties.Subnets",
"count": "[length(parameters('Network.Config').subnetConfig)]",
"input": {
"name": "[concat(parameters('Network.Config').subnetConfig[copyIndex('Network.Properties.Subnets')].aksId,'-',parameters('Network.Config').locationId)]",
"properties": "[parameters('Network.Config').subnetConfig[copyIndex('Network.Properties.Subnets')].properties]"
}
}
],
"Test.Blank.Variable": []
},
"resources": [
{
"name": "[variables('Network.Name')]",
"type": "Microsoft.Network/virtualNetworks",
"apiVersion": "2019-12-01",
"tags": "[variables('Network.Tags')]",
"properties": {
"addressSpace": {
"addressPrefixes": "[variables('Network.Properties.AddressSpace.AddressPrefixes')]"
},
"dhcpOptions": {
"dnsServers": "[variables('Network.Properties.DhcpOptions.DnsServers')]"
},
"subnets": "[variables('Network.Properties.Subnets')]"
}
}
],
"outputs": {
"state": {
"type": "object",
"value": "[reference(resourceId('Microsoft.Network/virtualNetworks',variables('Network.Name')), '2019-12-01', 'Full')]"
}
}
}

View file

@ -0,0 +1,53 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"Network.Config": {
"type": "object",
"metadata": {
"description": "Properties object for the Virtual Network"
}
}
},
"variables": {
"Network.Name": "[parameters('Network.Config').name]",
"Network.Location": "[parameters('Network.Config').location]",
"Network.Tags": "[parameters('Network.Config').tags]",
"Network.Properties.AddressSpace.AddressPrefixes": "[parameters('Network.Config').addressPrefixes]",
"Network.Properties.DhcpOptions.DnsServers": "[parameters('Network.Config').dnsServers]",
"copy": [
{
"name": "Network.Properties.Subnets",
"count": "[length(parameters('Network.Config').subnetConfig)]",
"input": {
"name": "[concat(parameters('Network.Config').subnetConfig[copyIndex('Network.Properties.Subnets')].aksId,'-',parameters('Network.Config').locationId)]",
"properties": "[parameters('Network.Config').subnetConfig[copyIndex('Network.Properties.Subnets')].properties]"
}
}
]
},
"resources": [
{
"name": "[variables('Network.Name')]",
"type": "Microsoft.Network/virtualNetworks",
"apiVersion": "2019-12-01",
"location": "[variables('Network.Location')]",
"tags": "[variables('Network.Tags')]",
"properties": {
"addressSpace": {
"addressPrefixes": "[variables('Network.Properties.AddressSpace.AddressPrefixes')]"
},
"dhcpOptions": {
"dnsServers": "[variables('Network.Properties.DhcpOptions.DnsServers')]"
},
"subnets": "[variables('Network.Properties.Subnets')]"
}
}
],
"outputs": {
"state": {
"type": "object",
"value": "[reference(resourceId('Microsoft.Network/virtualNetworks',variables('Network.Name')), '2019-12-01', 'Full')]"
}
}
}

View file

@ -0,0 +1,13 @@
# HTML Test Cases
This folder holds the test cases for **HTML**.
## Additional Docs
No Additional information is needed for this test case.
## Good Test Cases
The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted.
- **Note:** They are linted utilizing the default linter rules.
## Bad Test Cases
The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted.
- **Note:** They are linted utilizing the default linter rules.

View file

@ -0,0 +1,99 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div bad='' bad=''></div>
<div bad='' bad=''></div>
<div bad='' bad=''></div>
<div bad='' bad=''></div>
<div bad='' bad=''></div>
<div bad='' bad=''></div>
<div bad='' bad=''></div>
<div bad='' bad=''></div>
<div bad='' bad=''></div>
<div bad='' bad=''></div>
<div bad='' bad=''></div>
<div bad='' bad=''></div>
<div bad='' bad=''></div>
<div bad='' bad=''></div>
<div bad='' bad=''></div>
<div bad='' bad=''></div>
<div bad='' bad=''></div>
<input type="text"></input>
<div class"foo">
</div>
</div>
</hello>
</test>
</div>
<test>
<hello>
<div>
<div>
<div>
<div class='' what='' something=''></div>
</div>
</div>
</div>
</hello>
</test>
</div>
<test>
<hello>
<div>
<div>
<div>
<div class='' what='' something=''></div>
</div>
</div>
</div>
</hello>
</test>
</div>
<test>
<hello>
<div>
<div>
<div>
<div class='' what='' something=''></div>
</div>
</div>
</div>
</hello>
</test>
</div>
<test>
<hello>
<div>
<div>
<div>
<div class='' what='' something=''></div>
</div>
</div>
</div>
</hello>
</test>
</div>
</bad>
</bad>
</bad>
</bad>
</bad>
</bad>
</bad>
</bad>
</bad>
</bad>
</bad>
</bad>
</bad>
</bad>
</bad>
</bad>
</bad>
</body>
</html>

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
Good HTML!
</body>
</html>

7
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10

25
.github/linters/.htmlhintrc vendored Normal file
View file

@ -0,0 +1,25 @@
{
"tagname-lowercase": true,
"attr-lowercase": true,
"attr-value-double-quotes": true,
"attr-value-not-empty": false,
"attr-no-duplication": true,
"doctype-first": true,
"tag-pair": true,
"tag-self-close": false,
"spec-char-escape": true,
"id-unique": true,
"src-not-empty": true,
"title-require": true,
"alt-require": true,
"doctype-html5": true,
"id-class-value": "dash",
"style-disabled": false,
"inline-style-disabled": false,
"inline-script-disabled": false,
"space-tab-mixed-disabled": "space",
"id-class-ad-disabled": false,
"href-abs-or-rel": false,
"attr-unsafe-chars": true,
"head-script-disabled": true
}

View file

@ -41,7 +41,7 @@ jobs:
# Checkout the code base # # Checkout the code base #
########################## ##########################
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v2 uses: actions/checkout@v2.3.1
################################### ###################################
# Build image locally for testing # # Build image locally for testing #

View file

@ -35,7 +35,7 @@ jobs:
# Checkout the code base # # Checkout the code base #
########################## ##########################
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v2 uses: actions/checkout@v2.3.1
##################### #####################
# Run Deploy script # # Run Deploy script #

View file

@ -35,7 +35,7 @@ jobs:
# Checkout the code base # # Checkout the code base #
########################## ##########################
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v2 uses: actions/checkout@v2.3.1
################################### ###################################
# Run Deploy script for Dockerhub # # Run Deploy script for Dockerhub #

View file

@ -35,7 +35,7 @@ jobs:
# Checkout the code base # # Checkout the code base #
########################## ##########################
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v2 uses: actions/checkout@v2.3.1
################################ ################################
# Run Linter against code base # # Run Linter against code base #

View file

@ -29,7 +29,7 @@ jobs:
if: "github.event_name == 'schedule'" if: "github.event_name == 'schedule'"
steps: steps:
- name: Mark issue stale - name: Mark issue stale
uses: actions/stale@v3 uses: actions/stale@v3.0.7
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity.\nIt will be closed in 14 days if no further activity occurs.\nThank you for your contributions.\n\nIf you think this issue should stay open, please remove the `O: stale 🤖` label or comment on the issue." stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity.\nIt will be closed in 14 days if no further activity occurs.\nThank you for your contributions.\n\nIf you think this issue should stay open, please remove the `O: stale 🤖` label or comment on the issue."

View file

@ -32,12 +32,12 @@ jobs:
############################# #############################
# Check out the latest code # # Check out the latest code #
############################# #############################
- uses: actions/checkout@v2 - uses: actions/checkout@v2.3.1
###################### ######################
# Run the tag action # # Run the tag action #
###################### ######################
- uses: Actions-R-Us/actions-tagger@latest - uses: Actions-R-Us/actions-tagger@v2.0.1
with: with:
publish_latest_tag: true publish_latest_tag: true
env: env:

View file

@ -18,6 +18,21 @@ LABEL com.github.actions.name="GitHub Super-Linter" \
com.github.actions.color="red" \ com.github.actions.color="red" \
maintainer="GitHub DevOps <github_devops@github.com>" maintainer="GitHub DevOps <github_devops@github.com>"
################################
# Set ARG values used in Build #
################################
# PowerShell & PSScriptAnalyzer
ARG PWSH_VERSION='latest'
ARG PWSH_DIRECTORY='/opt/microsoft/powershell'
ARG PSSA_VERSION='latest'
# arm-ttk
ARG ARM_TTK_URI='https://github.com/Azure/arm-ttk.git'
ARG ARM_TTK_DIRECTORY='/opt/microsoft/arm-ttk'
# clj-kondo
ARG CLJ_KONDO_VERSION='2020.06.21'
# Go Linter
ARG GO_VERSION='v1.27.0'
#################### ####################
# Run APK installs # # Run APK installs #
#################### ####################
@ -40,9 +55,6 @@ RUN apk add --no-cache \
# Reference: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7 # Reference: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7
# Slightly modified to always retrieve latest stable Powershell version # Slightly modified to always retrieve latest stable Powershell version
# If changing PWSH_VERSION='latest' to a specific version, use format PWSH_VERSION='tags/v7.0.2' # If changing PWSH_VERSION='latest' to a specific version, use format PWSH_VERSION='tags/v7.0.2'
ARG PWSH_VERSION='latest'
ARG PWSH_DIRECTORY='/opt/microsoft/powershell'
ARG PSSA_VERSION='latest'
RUN mkdir -p ${PWSH_DIRECTORY} \ RUN mkdir -p ${PWSH_DIRECTORY} \
&& curl -s https://api.github.com/repos/powershell/powershell/releases/${PWSH_VERSION} \ && curl -s https://api.github.com/repos/powershell/powershell/releases/${PWSH_VERSION} \
| grep browser_download_url \ | grep browser_download_url \
@ -50,9 +62,19 @@ RUN mkdir -p ${PWSH_DIRECTORY} \
| cut -d '"' -f 4 \ | cut -d '"' -f 4 \
| xargs -n 1 wget -O - \ | xargs -n 1 wget -O - \
| tar -xzC ${PWSH_DIRECTORY} \ | tar -xzC ${PWSH_DIRECTORY} \
&& ln -s ${PWSH_DIRECTORY}/pwsh /usr/bin/pwsh -f \ && ln -sf ${PWSH_DIRECTORY}/pwsh /usr/bin/pwsh \
&& pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' && pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force'
#############################################################
# Install Azure Resource Manager Template Toolkit (arm-ttk) #
#############################################################
# Depends on PowerShell
# Reference https://github.com/Azure/arm-ttk
# Reference https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/test-toolkit
ENV ARM_TTK_PSD1="${ARM_TTK_DIRECTORY}/arm-ttk/arm-ttk.psd1"
RUN git clone "${ARM_TTK_URI}" "${ARM_TTK_DIRECTORY}" \
&& ln -sTf "$ARM_TTK_PSD1" /usr/bin/arm-ttk
##################### #####################
# Run Pip3 Installs # # Run Pip3 Installs #
##################### #####################
@ -77,6 +99,7 @@ RUN npm config set package-lock false \
stylelint \ stylelint \
stylelint-config-standard \ stylelint-config-standard \
@stoplight/spectral \ @stoplight/spectral \
htmlhint \
&& npm --no-cache install \ && npm --no-cache install \
markdownlint-cli \ markdownlint-cli \
jsonlint prettyjson \ jsonlint prettyjson \
@ -90,7 +113,8 @@ RUN npm config set package-lock false \
@typescript-eslint/parser \ @typescript-eslint/parser \
eslint-plugin-jest \ eslint-plugin-jest \
stylelint \ stylelint \
stylelint-config-standard stylelint-config-standard \
htmlhint
#################################### ####################################
# Install dockerfilelint from repo # # Install dockerfilelint from repo #
@ -121,7 +145,6 @@ RUN wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/s
##################### #####################
# Install Go Linter # # Install Go Linter #
##################### #####################
ARG GO_VERSION='v1.27.0'
RUN wget -O- -nvq https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s "$GO_VERSION" RUN wget -O- -nvq https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s "$GO_VERSION"
################## ##################
@ -147,7 +170,6 @@ RUN wget "https://github.com/dotenv-linter/dotenv-linter/releases/latest/downloa
##################### #####################
# Install clj-kondo # # Install clj-kondo #
##################### #####################
ARG CLJ_KONDO_VERSION='2020.06.21'
RUN curl -sLO https://github.com/borkdude/clj-kondo/releases/download/v${CLJ_KONDO_VERSION}/clj-kondo-${CLJ_KONDO_VERSION}-linux-static-amd64.zip \ RUN curl -sLO https://github.com/borkdude/clj-kondo/releases/download/v${CLJ_KONDO_VERSION}/clj-kondo-${CLJ_KONDO_VERSION}-linux-static-amd64.zip \
&& unzip clj-kondo-${CLJ_KONDO_VERSION}-linux-static-amd64.zip \ && unzip clj-kondo-${CLJ_KONDO_VERSION}-linux-static-amd64.zip \
&& rm clj-kondo-${CLJ_KONDO_VERSION}-linux-static-amd64.zip \ && rm clj-kondo-${CLJ_KONDO_VERSION}-linux-static-amd64.zip \
@ -197,6 +219,7 @@ ENV GITHUB_SHA=${GITHUB_SHA} \
VALIDATE_CLOJURE=${VALIDATE_CLOJURE} \ VALIDATE_CLOJURE=${VALIDATE_CLOJURE} \
VALIDATE_KOTLIN=${VALIDATE_KOTLIN} \ VALIDATE_KOTLIN=${VALIDATE_KOTLIN} \
VALIDATE_POWERSHELL=${VALIDATE_POWERSHELL} \ VALIDATE_POWERSHELL=${VALIDATE_POWERSHELL} \
VALIDATE_ARM=${VALIDATE_ARM} \
VALIDATE_OPENAPI=${VALIDATE_OPENAPI} \ VALIDATE_OPENAPI=${VALIDATE_OPENAPI} \
VALIDATE_PROTOBUF=${VALIDATE_PROTOBUF} \ VALIDATE_PROTOBUF=${VALIDATE_PROTOBUF} \
VALIDATE_EDITORCONFIG=${VALIDATE_EDITORCONFIG} \ VALIDATE_EDITORCONFIG=${VALIDATE_EDITORCONFIG} \

View file

@ -34,6 +34,7 @@ Developers on **GitHub** can call the **GitHub Action** to lint their code base
| *Language* | *Linter* | | *Language* | *Linter* |
| --- | --- | | --- | --- |
| **Ansible** | [ansible-lint](https://github.com/ansible/ansible-lint) | | **Ansible** | [ansible-lint](https://github.com/ansible/ansible-lint) |
| **Azure Resource Manager (ARM)** | [arm-ttk](https://github.com/azure/arm-ttk) |
| **AWS CloudFormation templates** | [cfn-lint](https://github.com/aws-cloudformation/cfn-python-lint/) | | **AWS CloudFormation templates** | [cfn-lint](https://github.com/aws-cloudformation/cfn-python-lint/) |
| **CSS** | [stylelint](https://stylelint.io/) | | **CSS** | [stylelint](https://stylelint.io/) |
| **Clojure** | [clj-kondo](https://github.com/borkdude/clj-kondo) | | **Clojure** | [clj-kondo](https://github.com/borkdude/clj-kondo) |
@ -42,6 +43,7 @@ Developers on **GitHub** can call the **GitHub Action** to lint their code base
| **EDITORCONFIG** | [editorconfig-checker](https://github.com/editorconfig-checker/editorconfig-checker) | | **EDITORCONFIG** | [editorconfig-checker](https://github.com/editorconfig-checker/editorconfig-checker) |
| **ENV** | [dotenv-linter](https://github.com/dotenv-linter/dotenv-linter) | | **ENV** | [dotenv-linter](https://github.com/dotenv-linter/dotenv-linter) |
| **Golang** | [golangci-lint](https://github.com/golangci/golangci-lint) | | **Golang** | [golangci-lint](https://github.com/golangci/golangci-lint) |
| **HTMLHint** | [HTMLHint](https://github.com/htmlhint/HTMLHint) |
| **JavaScript** | [eslint](https://eslint.org/) [standard js](https://standardjs.com/) | | **JavaScript** | [eslint](https://eslint.org/) [standard js](https://standardjs.com/) |
| **JSON** | [jsonlint](https://github.com/zaach/jsonlint) | | **JSON** | [jsonlint](https://github.com/zaach/jsonlint) |
| **Kotlin** | [ktlint](https://github.com/pinterest/ktlint) | | **Kotlin** | [ktlint](https://github.com/pinterest/ktlint) |
@ -172,10 +174,12 @@ and won't run anything unexpected.
| **VALIDATE_DOCKER** | `true` | Flag to enable or disable the linting process of the language. | | **VALIDATE_DOCKER** | `true` | Flag to enable or disable the linting process of the language. |
| **VALIDATE_GO** | `true` | Flag to enable or disable the linting process of the language. | | **VALIDATE_GO** | `true` | Flag to enable or disable the linting process of the language. |
| **VALIDATE_POWERSHELL** | `true` | Flag to enable or disable the linting process of the language. | | **VALIDATE_POWERSHELL** | `true` | Flag to enable or disable the linting process of the language. |
| **VALIDATE_ARM** | `true` | Flag to enable or disable the linting process of the language. |
| **VALIDATE_TERRAFORM** | `true` | Flag to enable or disable the linting process of the language. | | **VALIDATE_TERRAFORM** | `true` | Flag to enable or disable the linting process of the language. |
| **VALIDATE_CSS** | `true` | Flag to enable or disable the linting process of the language. | | **VALIDATE_CSS** | `true` | Flag to enable or disable the linting process of the language. |
| **VALIDATE_ENV** | `true` | Flag to enable or disable the linting process of the language. | | **VALIDATE_ENV** | `true` | Flag to enable or disable the linting process of the language. |
| **VALIDATE_CLOJURE** | `true` | Flag to enable or disable the linting process of the language. | | **VALIDATE_CLOJURE** | `true` | Flag to enable or disable the linting process of the language. |
| **VALIDATE_HTML** | `true` | Flag to enable or disable the linting process of the language. |
| **VALIDATE_KOTLIN** | `true` | Flag to enable or disable the linting process of the language. | | **VALIDATE_KOTLIN** | `true` | Flag to enable or disable the linting process of the language. |
| **VALIDATE_OPENAPI** | `true` | Flag to enable or disable the linting process of the language. | | **VALIDATE_OPENAPI** | `true` | Flag to enable or disable the linting process of the language. |
| **VALIDATE_CLOUDFORMATION** | `true` | Flag to enable or disable the linting process of the language. | | **VALIDATE_CLOUDFORMATION** | `true` | Flag to enable or disable the linting process of the language. |

30
TEMPLATES/.arm-ttk.psd1 Normal file
View file

@ -0,0 +1,30 @@
# Documentation:
# - Test Parameters: https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/test-toolkit#test-parameters
# - Test Cases: https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/test-cases
@{
# Test = @(
# 'Parameters Property Must Exist',
# 'Parameters Must Be Referenced',
# 'Secure String Parameters Cannot Have Default',
# 'Location Should Not Be Hardcoded',
# 'Resources Should Have Location',
# 'VM Size Should Be A Parameter',
# 'Min And Max Value Are Numbers',
# 'artifacts-parameter',
# 'Variables Must Be Referenced',
# 'Dynamic Variable References Should Not Use Concat',
# 'apiVersions Should Be Recent',
# 'Providers apiVersions Is Not Permitted',
# 'Template Should Not Contain Blanks',
# 'IDs Should Be Derived From ResourceIDs',
# 'ResourceIds should not contain',
# 'DependsOn Must Not Be Conditional',
# 'Deployment Resources Must Not Be Debug',
# 'adminUsername Should Not Be A Literal',
# 'VM Images Should Use Latest Version',
# 'Virtual-Machines-Should-Not-Be-Preview',
# 'ManagedIdentityExtension must not be used',
# 'Outputs Must Not Contain Secrets'
# )
# Skip = @()
}

25
TEMPLATES/.htmlhintrc Normal file
View file

@ -0,0 +1,25 @@
{
"tagname-lowercase": true,
"attr-lowercase": true,
"attr-value-double-quotes": true,
"attr-value-not-empty": false,
"attr-no-duplication": true,
"doctype-first": true,
"tag-pair": true,
"tag-self-close": false,
"spec-char-escape": true,
"id-unique": true,
"src-not-empty": true,
"title-require": true,
"alt-require": true,
"doctype-html5": true,
"id-class-value": "dash",
"style-disabled": false,
"inline-style-disabled": false,
"inline-script-disabled": false,
"space-tab-mixed-disabled": "space",
"id-class-ad-disabled": false,
"href-abs-or-rel": false,
"attr-unsafe-chars": true,
"head-script-disabled": true
}

View file

@ -37,6 +37,7 @@ For some linters it is also possible to override rules on a case by case level w
- [OpenAPI](#openapi) - [OpenAPI](#openapi)
- [Protocol Buffers](#protocol-buffers) - [Protocol Buffers](#protocol-buffers)
- [EDITORCONFIG-CHECKER](#editorconfig-checker) - [EDITORCONFIG-CHECKER](#editorconfig-checker)
- [HTML](#html)
<!-- toc --> <!-- toc -->
@ -776,3 +777,18 @@ lint:
] ]
} }
``` ```
## HTML
- [htmlhint](https://htmlhint.com/)
### htmlhint standard Config file
- `.github/linters/.htmlhintrc`
### htmlhint disable single line
- There is currently **No** way to disable rules in a single line
### htmlhint disable code block
- There is currently **No** way to disable rules in a code block
### htmlhint disable entire file
- There is currently **No** way to disable rules in an entire file

View file

@ -81,11 +81,6 @@ function BuildFileList() {
echo "----------------------------------------------" echo "----------------------------------------------"
echo "Files that have been modified in the commit(s):" echo "Files that have been modified in the commit(s):"
for FILE in "${RAW_FILE_ARRAY[@]}"; do for FILE in "${RAW_FILE_ARRAY[@]}"; do
##############
# Print file #
##############
echo "File:[$FILE]"
########################### ###########################
# Get the files extension # # Get the files extension #
########################### ###########################
@ -93,6 +88,11 @@ function BuildFileList() {
# reverse it back, substitute to lowercase # reverse it back, substitute to lowercase
FILE_TYPE=$(basename "$FILE" | rev | cut -f1 -d'.' | rev | awk '{print tolower($0)}') FILE_TYPE=$(basename "$FILE" | rev | cut -f1 -d'.' | rev | awk '{print tolower($0)}')
##############
# Print file #
##############
echo "File:[$FILE], File_type:[$FILE_TYPE]"
######### #########
# DEBUG # # DEBUG #
######### #########
@ -142,7 +142,15 @@ function BuildFileList() {
################################ ################################
FILE_ARRAY_OPENAPI+=("$FILE") FILE_ARRAY_OPENAPI+=("$FILE")
fi fi
############################
# Check if file is ARM #
############################
if DetectARMFile "$FILE"; then
################################
# Append the file to the array #
################################
FILE_ARRAY_ARM+=("$FILE")
fi
##################################### #####################################
# Check if the file is CFN template # # Check if the file is CFN template #
##################################### #####################################
@ -345,7 +353,7 @@ function BuildFileList() {
# Set the READ_ONLY_CHANGE_FLAG since this could be exec # # Set the READ_ONLY_CHANGE_FLAG since this could be exec #
########################################################## ##########################################################
READ_ONLY_CHANGE_FLAG=1 READ_ONLY_CHANGE_FLAG=1
elif [ "$FILE" == "dockerfile" ]; then elif [ "$FILE" == "dockerfile" ] || [ "$FILE_TYPE" == "dockerfile" ]; then
################################ ################################
# Append the file to the array # # Append the file to the array #
################################ ################################
@ -363,6 +371,15 @@ function BuildFileList() {
# Set the READ_ONLY_CHANGE_FLAG since this could be exec # # Set the READ_ONLY_CHANGE_FLAG since this could be exec #
########################################################## ##########################################################
READ_ONLY_CHANGE_FLAG=1 READ_ONLY_CHANGE_FLAG=1
elif [ "$FILE_TYPE" == "html" ]; then
################################
# Append the file to the array #
##############################p##
FILE_ARRAY_HTML+=("$FILE")
##########################################################
# Set the READ_ONLY_CHANGE_FLAG since this could be exec #
##########################################################
READ_ONLY_CHANGE_FLAG=1
else else
############################################## ##############################################
# Use file to see if we can parse what it is # # Use file to see if we can parse what it is #

View file

@ -35,13 +35,13 @@ PYTHON_FILE_NAME='.python-lint' # Name of the fi
PYTHON_LINTER_RULES="$DEFAULT_RULES_LOCATION/$PYTHON_FILE_NAME" # Path to the python lint rules PYTHON_LINTER_RULES="$DEFAULT_RULES_LOCATION/$PYTHON_FILE_NAME" # Path to the python lint rules
# Cloudformation Vars # Cloudformation Vars
CFN_FILE_NAME='.cfnlintrc.yml' # Name of the file CFN_FILE_NAME='.cfnlintrc.yml' # Name of the file
CFN_LINTER_RULES="$DEFAULT_RULES_LOCATION/$CFN_FILE_NAME" # Path to the python lint rules CFN_LINTER_RULES="$DEFAULT_RULES_LOCATION/$CFN_FILE_NAME" # Path to the cloudformation lint rules
# Ruby Vars # Ruby Vars
RUBY_FILE_NAME="${RUBY_CONFIG_FILE:-.ruby-lint.yml}" # Name of the file RUBY_FILE_NAME="${RUBY_CONFIG_FILE:-.ruby-lint.yml}" # Name of the file
RUBY_LINTER_RULES="$DEFAULT_RULES_LOCATION/$RUBY_FILE_NAME" # Path to the ruby lint rules RUBY_LINTER_RULES="$DEFAULT_RULES_LOCATION/$RUBY_FILE_NAME" # Path to the ruby lint rules
# Coffee Vars # Coffee Vars
COFFEESCRIPT_FILE_NAME='.coffee-lint.json' # Name of the file COFFEE_FILE_NAME='.coffee-lint.json' # Name of the file
COFFEESCRIPT_LINTER_RULES="$DEFAULT_RULES_LOCATION/$COFFEESCRIPT_FILE_NAME" # Path to the coffeescript lint rules COFFEESCRIPT_LINTER_RULES="$DEFAULT_RULES_LOCATION/$COFFEE_FILE_NAME" # Path to the coffeescript lint rules
# Javascript Vars # Javascript Vars
JAVASCRIPT_FILE_NAME="${JAVASCRIPT_ES_CONFIG_FILE:-.eslintrc.yml}" # Name of the file JAVASCRIPT_FILE_NAME="${JAVASCRIPT_ES_CONFIG_FILE:-.eslintrc.yml}" # Name of the file
JAVASCRIPT_LINTER_RULES="$DEFAULT_RULES_LOCATION/$JAVASCRIPT_FILE_NAME" # Path to the Javascript lint rules JAVASCRIPT_LINTER_RULES="$DEFAULT_RULES_LOCATION/$JAVASCRIPT_FILE_NAME" # Path to the Javascript lint rules
@ -65,6 +65,9 @@ TERRAFORM_LINTER_RULES="$DEFAULT_RULES_LOCATION/$TERRAFORM_FILE_NAME" # Path to
# Powershell Vars # Powershell Vars
POWERSHELL_FILE_NAME='.powershell-psscriptanalyzer.psd1' # Name of the file POWERSHELL_FILE_NAME='.powershell-psscriptanalyzer.psd1' # Name of the file
POWERSHELL_LINTER_RULES="$DEFAULT_RULES_LOCATION/$POWERSHELL_FILE_NAME" # Path to the Powershell lint rules POWERSHELL_LINTER_RULES="$DEFAULT_RULES_LOCATION/$POWERSHELL_FILE_NAME" # Path to the Powershell lint rules
# Azure Resource Manager Vars
ARM_FILE_NAME='.arm-ttk.psd1' # Name of the file
ARM_LINTER_RULES="$DEFAULT_RULES_LOCATION/$ARM_FILE_NAME" # Path to the ARM lint rules
# CSS Vars # CSS Vars
CSS_FILE_NAME='.stylelintrc.json' # Name of the file CSS_FILE_NAME='.stylelintrc.json' # Name of the file
CSS_LINTER_RULES="$DEFAULT_RULES_LOCATION/$CSS_FILE_NAME" # Path to the CSS lint rules CSS_LINTER_RULES="$DEFAULT_RULES_LOCATION/$CSS_FILE_NAME" # Path to the CSS lint rules
@ -75,8 +78,11 @@ OPENAPI_LINTER_RULES="$DEFAULT_RULES_LOCATION/$OPENAPI_FILE_NAME" # Path to the
PROTOBUF_FILE_NAME='.protolintrc.yml' # Name of the file PROTOBUF_FILE_NAME='.protolintrc.yml' # Name of the file
PROTOBUF_LINTER_RULES="$DEFAULT_RULES_LOCATION/$PROTOBUF_FILE_NAME" # Path to the Protocol Buffers lint rules PROTOBUF_LINTER_RULES="$DEFAULT_RULES_LOCATION/$PROTOBUF_FILE_NAME" # Path to the Protocol Buffers lint rules
# Clojure Vars # Clojure Vars
CLOJURE_FILE_NAME='.clj-kondo/config.edn' CLOJURE_FILE_NAME='.clj-kondo/config.edn' # Name of the file
CLOJURE_LINTER_RULES="$DEFAULT_RULES_LOCATION/$CLOJURE_FILE_NAME" CLOJURE_LINTER_RULES="$DEFAULT_RULES_LOCATION/$CLOJURE_FILE_NAME" # Path to the Clojure lint rules
# HTML Vars
HTML_FILE_NAME='.htmlhintrc' # Name of the file
HTML_LINTER_RULES="$DEFAULT_RULES_LOCATION/$HTML_FILE_NAME" # Path to the CSS lint rules
####################################### #######################################
# Linter array for information prints # # Linter array for information prints #
@ -84,8 +90,8 @@ CLOJURE_LINTER_RULES="$DEFAULT_RULES_LOCATION/$CLOJURE_FILE_NAME"
LINTER_ARRAY=("jsonlint" "yamllint" "xmllint" "markdownlint" "shellcheck" LINTER_ARRAY=("jsonlint" "yamllint" "xmllint" "markdownlint" "shellcheck"
"pylint" "perl" "rubocop" "coffeelint" "eslint" "standard" "pylint" "perl" "rubocop" "coffeelint" "eslint" "standard"
"ansible-lint" "/dockerfilelint/bin/dockerfilelint" "golangci-lint" "tflint" "ansible-lint" "/dockerfilelint/bin/dockerfilelint" "golangci-lint" "tflint"
"stylelint" "dotenv-linter" "pwsh" "ktlint" "protolint" "clj-kondo" "stylelint" "dotenv-linter" "pwsh" "arm-ttk" "ktlint" "protolint" "clj-kondo"
"spectral" "cfn-lint") "spectral" "cfn-lint" "htmlhint")
############################# #############################
# Language array for prints # # Language array for prints #
@ -93,7 +99,8 @@ LINTER_ARRAY=("jsonlint" "yamllint" "xmllint" "markdownlint" "shellcheck"
LANGUAGE_ARRAY=('YML' 'JSON' 'XML' 'MARKDOWN' 'BASH' 'PERL' 'PHP' 'RUBY' 'PYTHON' LANGUAGE_ARRAY=('YML' 'JSON' 'XML' 'MARKDOWN' 'BASH' 'PERL' 'PHP' 'RUBY' 'PYTHON'
'COFFEESCRIPT' 'ANSIBLE' 'JAVASCRIPT_STANDARD' 'JAVASCRIPT_ES' 'COFFEESCRIPT' 'ANSIBLE' 'JAVASCRIPT_STANDARD' 'JAVASCRIPT_ES'
'TYPESCRIPT_STANDARD' 'TYPESCRIPT_ES' 'DOCKER' 'GO' 'TERRAFORM' 'TYPESCRIPT_STANDARD' 'TYPESCRIPT_ES' 'DOCKER' 'GO' 'TERRAFORM'
'CSS' 'ENV' 'POWERSHELL' 'KOTLIN' 'PROTOBUF' 'CLOJURE' 'OPENAPI' 'CFN') 'CSS' 'ENV' 'POWERSHELL' 'ARM' 'KOTLIN' 'PROTOBUF' 'CLOJURE' 'OPENAPI'
'CFN' 'HTML')
################### ###################
# GitHub ENV Vars # # GitHub ENV Vars #
@ -127,11 +134,13 @@ VALIDATE_ENV="${VALIDATE_ENV}" # Boolean to vali
VALIDATE_CLOJURE="${VALIDATE_CLOJURE}" # Boolean to validate language VALIDATE_CLOJURE="${VALIDATE_CLOJURE}" # Boolean to validate language
VALIDATE_TERRAFORM="${VALIDATE_TERRAFORM}" # Boolean to validate language VALIDATE_TERRAFORM="${VALIDATE_TERRAFORM}" # Boolean to validate language
VALIDATE_POWERSHELL="${VALIDATE_POWERSHELL}" # Boolean to validate language VALIDATE_POWERSHELL="${VALIDATE_POWERSHELL}" # Boolean to validate language
VALIDATE_ARM="${VALIDATE_ARM}" # Boolean to validate language
VALIDATE_KOTLIN="${VALIDATE_KOTLIN}" # Boolean to validate language VALIDATE_KOTLIN="${VALIDATE_KOTLIN}" # Boolean to validate language
VALIDATE_OPENAPI="${VALIDATE_OPENAPI}" # Boolean to validate language VALIDATE_OPENAPI="${VALIDATE_OPENAPI}" # Boolean to validate language
VALIDATE_EDITORCONFIG="${VALIDATE_EDITORCONFIG}" # Boolean to validate files with editorconfig VALIDATE_EDITORCONFIG="${VALIDATE_EDITORCONFIG}" # Boolean to validate files with editorconfig
TEST_CASE_RUN="${TEST_CASE_RUN}" # Boolean to validate only test cases TEST_CASE_RUN="${TEST_CASE_RUN}" # Boolean to validate only test cases
DISABLE_ERRORS="${DISABLE_ERRORS}" # Boolean to enable warning-only output without throwing errors DISABLE_ERRORS="${DISABLE_ERRORS}" # Boolean to enable warning-only output without throwing errors
VALIDATE_HTML="${VALIDATE_HTML}" # Boolean to validate language
############## ##############
# Debug Vars # # Debug Vars #
@ -184,12 +193,14 @@ FILE_ARRAY_DOCKER=() # Array of files to check
FILE_ARRAY_GO=() # Array of files to check FILE_ARRAY_GO=() # Array of files to check
FILE_ARRAY_TERRAFORM=() # Array of files to check FILE_ARRAY_TERRAFORM=() # Array of files to check
FILE_ARRAY_POWERSHELL=() # Array of files to check FILE_ARRAY_POWERSHELL=() # Array of files to check
FILE_ARRAY_ARM=() # Array of files to check
FILE_ARRAY_CSS=() # Array of files to check FILE_ARRAY_CSS=() # Array of files to check
FILE_ARRAY_ENV=() # Array of files to check FILE_ARRAY_ENV=() # Array of files to check
FILE_ARRAY_CLOJURE=() # Array of files to check FILE_ARRAY_CLOJURE=() # Array of files to check
FILE_ARRAY_KOTLIN=() # Array of files to check FILE_ARRAY_KOTLIN=() # Array of files to check
FILE_ARRAY_PROTOBUF=() # Array of files to check FILE_ARRAY_PROTOBUF=() # Array of files to check
FILE_ARRAY_OPENAPI=() # Array of files to check FILE_ARRAY_OPENAPI=() # Array of files to check
FILE_ARRAY_HTML=() # Array of files to check
############ ############
# Counters # # Counters #
@ -214,12 +225,14 @@ ERRORS_FOUND_DOCKER=0 # Count of errors found
ERRORS_FOUND_GO=0 # Count of errors found ERRORS_FOUND_GO=0 # Count of errors found
ERRORS_FOUND_TERRAFORM=0 # Count of errors found ERRORS_FOUND_TERRAFORM=0 # Count of errors found
ERRORS_FOUND_POWERSHELL=0 # Count of errors found ERRORS_FOUND_POWERSHELL=0 # Count of errors found
ERRORS_FOUND_ARM=0 # Count of errors found
ERRORS_FOUND_CSS=0 # Count of errors found ERRORS_FOUND_CSS=0 # Count of errors found
ERRORS_FOUND_ENV=0 # Count of errors found ERRORS_FOUND_ENV=0 # Count of errors found
ERRORS_FOUND_CLOJURE=0 # Count of errors found ERRORS_FOUND_CLOJURE=0 # Count of errors found
ERRORS_FOUND_KOTLIN=0 # Count of errors found ERRORS_FOUND_KOTLIN=0 # Count of errors found
ERRORS_FOUND_PROTOBUF=0 # Count of errors found ERRORS_FOUND_PROTOBUF=0 # Count of errors found
ERRORS_FOUND_OPENAPI=0 # Count of errors found ERRORS_FOUND_OPENAPI=0 # Count of errors found
ERRORS_FOUND_HTML=0 # Count of errors found
################################################################################ ################################################################################
########################## FUNCTIONS BELOW ##################################### ########################## FUNCTIONS BELOW #####################################
@ -254,19 +267,24 @@ GetLinterVersions() {
echo "" echo ""
echo "---------------------------------------------" echo "---------------------------------------------"
echo "Linter Version Info:" echo "Linter Version Info:"
echo "---------------------------------------------"
echo ""
########################################################## ##########################################################
# Go through the array of linters and print version info # # Go through the array of linters and print version info #
########################################################## ##########################################################
for LINTER in "${LINTER_ARRAY[@]}"; do for LINTER in "${LINTER_ARRAY[@]}"; do
echo "---------------------------------------------"
echo "[$LINTER]:"
################### ###################
# Get the version # # Get the version #
################### ###################
if [[ "$LINTER" == "arm-ttk" ]]; then
# Need specific command for ARM
mapfile -t GET_VERSION_CMD < <(grep -iE 'version' "$ARM_TTK_PSD1" | xargs 2>&1)
elif [[ "$LINTER" == "protolint" ]]; then
# Need specific command for Protolint
mapfile -t GET_VERSION_CMD < <(echo "--version not supported")
else
# Standard version command
mapfile -t GET_VERSION_CMD < <("$LINTER" --version 2>&1) mapfile -t GET_VERSION_CMD < <("$LINTER" --version 2>&1)
fi
####################### #######################
# Load the error code # # Load the error code #
@ -277,16 +295,20 @@ GetLinterVersions() {
# Check the shell for errors # # Check the shell for errors #
############################## ##############################
if [ $ERROR_CODE -ne 0 ] || [ -z "${GET_VERSION_CMD[*]}" ]; then if [ $ERROR_CODE -ne 0 ] || [ -z "${GET_VERSION_CMD[*]}" ]; then
echo -e "${NC}${F[Y]}WARN!${NC} Failed to get version info for:[$LINTER]${NC}" echo -e "${NC}[$LINTER]: ${F[Y]}WARN!${NC} Failed to get version info for:${NC}"
echo "---------------------------------------------"
else else
########################## ##########################
# Print the version info # # Print the version info #
########################## ##########################
echo "${GET_VERSION_CMD[*]}" echo -e "${NC}${F[B]}Successfully found version for ${F[W]}[$LINTER]${F[B]}: ${F[W]}${GET_VERSION_CMD[*]}${NC}"
echo "---------------------------------------------"
fi fi
done done
#########################
# Print version footers #
#########################
echo "---------------------------------------------"
echo ""
} }
################################################################################ ################################################################################
#### Function GetLinterRules ################################################### #### Function GetLinterRules ###################################################
@ -436,6 +458,39 @@ DetectOpenAPIFile() {
fi fi
} }
################################################################################ ################################################################################
#### Function DetectARMFile ####################################################
DetectARMFile() {
################
# Pull in vars #
################
FILE="$1" # Name of the file/path we are validating
###############################
# Check the file for keywords #
###############################
grep -E 'schema.management.azure.com' "$FILE" > /dev/null
#######################
# Load the error code #
#######################
ERROR_CODE=$?
##############################
# Check the shell for errors #
##############################
if [ $ERROR_CODE -eq 0 ]; then
########################
# Found string in file #
########################
return 0
else
###################
# No string match #
###################
return 1
fi
}
################################################################################
#### Function DetectCloudFormationFile ######################################### #### Function DetectCloudFormationFile #########################################
DetectCloudFormationFile() { DetectCloudFormationFile() {
################ ################
@ -721,6 +776,7 @@ Footer() {
[ "$ERRORS_FOUND_GO" -ne 0 ] || [ "$ERRORS_FOUND_GO" -ne 0 ] ||
[ "$ERRORS_FOUND_TERRAFORM" -ne 0 ] || [ "$ERRORS_FOUND_TERRAFORM" -ne 0 ] ||
[ "$ERRORS_FOUND_POWERSHELL" -ne 0 ] || [ "$ERRORS_FOUND_POWERSHELL" -ne 0 ] ||
[ "$ERRORS_FOUND_ARM" -ne 0 ] ||
[ "$ERRORS_FOUND_RUBY" -ne 0 ] || [ "$ERRORS_FOUND_RUBY" -ne 0 ] ||
[ "$ERRORS_FOUND_CSS" -ne 0 ] || [ "$ERRORS_FOUND_CSS" -ne 0 ] ||
[ "$ERRORS_FOUND_CFN" -ne 0 ] || [ "$ERRORS_FOUND_CFN" -ne 0 ] ||
@ -728,7 +784,8 @@ Footer() {
[ "$ERRORS_FOUND_OPENAPI" -ne 0 ] || [ "$ERRORS_FOUND_OPENAPI" -ne 0 ] ||
[ "$ERRORS_FOUND_PROTOBUF" -ne 0 ] || [ "$ERRORS_FOUND_PROTOBUF" -ne 0 ] ||
[ "$ERRORS_FOUND_CLOJURE" -ne 0 ] || [ "$ERRORS_FOUND_CLOJURE" -ne 0 ] ||
[ "$ERRORS_FOUND_KOTLIN" -ne 0 ]; then [ "$ERRORS_FOUND_KOTLIN" -ne 0 ] ||
[ "$ERRORS_FOUND_HTML" -ne 0 ]; then
# Failed exit # Failed exit
echo -e "${NC}${F[R]}Exiting with errors found!${NC}" echo -e "${NC}${F[R]}Exiting with errors found!${NC}"
exit 1 exit 1
@ -793,10 +850,14 @@ GetLinterRules "DOCKER"
GetLinterRules "TERRAFORM" GetLinterRules "TERRAFORM"
# Get PowerShell rules # Get PowerShell rules
GetLinterRules "POWERSHELL" GetLinterRules "POWERSHELL"
# Get ARM rules
GetLinterRules "ARM"
# Get CSS rules # Get CSS rules
GetLinterRules "CSS" GetLinterRules "CSS"
# Get CFN rules # Get CFN rules
GetLinterRules "CFN" GetLinterRules "CFN"
# Get HTML rules
GetLinterRules "HTML"
################################# #################################
# Check if were in verbose mode # # Check if were in verbose mode #
@ -1135,6 +1196,17 @@ if [ "$VALIDATE_POWERSHELL" == "true" ]; then
LintCodebase "POWERSHELL" "pwsh" "Invoke-ScriptAnalyzer -EnableExit -Settings $POWERSHELL_LINTER_RULES -Path" ".*\.\(ps1\|psm1\|psd1\|ps1xml\|pssc\|psrc\|cdxml\)\$" "${FILE_ARRAY_POWERSHELL[@]}" LintCodebase "POWERSHELL" "pwsh" "Invoke-ScriptAnalyzer -EnableExit -Settings $POWERSHELL_LINTER_RULES -Path" ".*\.\(ps1\|psm1\|psd1\|ps1xml\|pssc\|psrc\|cdxml\)\$" "${FILE_ARRAY_POWERSHELL[@]}"
fi fi
########################
# ARM Template LINTING #
########################
if [ "$VALIDATE_ARM" == "true" ]; then
###############################
# Lint the ARM Template files #
###############################
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY"
LintCodebase "ARM" "arm-ttk" "Import-Module $ARM_TTK_PSD1 ; \$config = \$(Import-PowerShellDataFile -Path $ARM_LINTER_RULES) ; Test-AzTemplate @config -TemplatePath" ".*\.\(json\)\$" "${FILE_ARRAY_ARM[@]}"
fi
################### ###################
# OPENAPI LINTING # # OPENAPI LINTING #
################### ###################
@ -1166,6 +1238,20 @@ if [ "$VALIDATE_OPENAPI" == "true" ]; then
LintCodebase "OPENAPI" "spectral" "spectral lint -r $OPENAPI_LINTER_RULES" "disabledfileext" "${FILE_ARRAY_OPENAPI[@]}" LintCodebase "OPENAPI" "spectral" "spectral lint -r $OPENAPI_LINTER_RULES" "disabledfileext" "${FILE_ARRAY_OPENAPI[@]}"
fi fi
################
# HTML LINTING #
################
if [ "$VALIDATE_HTML" == "true" ]; then
#################################
# Get HTML standard rules #
#################################
GetStandardRules "htmlhint"
#############################
# Lint the HTML files #
#############################
LintCodebase "HTML" "htmlhint" "htmlhint --config $HTML_LINTER_RULES" ".*\.\(html\)\$" "${FILE_ARRAY_HTML[@]}"
fi
########## ##########
# Footer # # Footer #
########## ##########

View file

@ -65,6 +65,7 @@ function GetValidationInfo() {
VALIDATE_GO=$(echo "$VALIDATE_GO" | awk '{print tolower($0)}') VALIDATE_GO=$(echo "$VALIDATE_GO" | awk '{print tolower($0)}')
VALIDATE_TERRAFORM=$(echo "$VALIDATE_TERRAFORM" | awk '{print tolower($0)}') VALIDATE_TERRAFORM=$(echo "$VALIDATE_TERRAFORM" | awk '{print tolower($0)}')
VALIDATE_POWERSHELL=$(echo "$VALIDATE_POWERSHELL" | awk '{print tolower($0)}') VALIDATE_POWERSHELL=$(echo "$VALIDATE_POWERSHELL" | awk '{print tolower($0)}')
VALIDATE_ARM=$(echo "$VALIDATE_ARM" | awk '{print tolower($0)}')
VALIDATE_CSS=$(echo "$VALIDATE_CSS" | awk '{print tolower($0)}') VALIDATE_CSS=$(echo "$VALIDATE_CSS" | awk '{print tolower($0)}')
VALIDATE_ENV=$(echo "$VALIDATE_ENV" | awk '{print tolower($0)}') VALIDATE_ENV=$(echo "$VALIDATE_ENV" | awk '{print tolower($0)}')
VALIDATE_CLOJURE=$(echo "$VALIDATE_CLOJURE" | awk '{print tolower($0)}') VALIDATE_CLOJURE=$(echo "$VALIDATE_CLOJURE" | awk '{print tolower($0)}')
@ -72,6 +73,7 @@ function GetValidationInfo() {
VALIDATE_PROTOBUF=$(echo "$VALIDATE_PROTOBUF" | awk '{print tolower($0)}') VALIDATE_PROTOBUF=$(echo "$VALIDATE_PROTOBUF" | awk '{print tolower($0)}')
VALIDATE_OPENAPI=$(echo "$VALIDATE_OPENAPI" | awk '{print tolower($0)}') VALIDATE_OPENAPI=$(echo "$VALIDATE_OPENAPI" | awk '{print tolower($0)}')
VALIDATE_EDITORCONFIG=$(echo "$VALIDATE_EDITORCONFIG" | awk '{print tolower($0)}') VALIDATE_EDITORCONFIG=$(echo "$VALIDATE_EDITORCONFIG" | awk '{print tolower($0)}')
VALIDATE_HTML=$(echo "$VALIDATE_HTML" | awk '{print tolower($0)}')
################################################ ################################################
# Determine if any linters were explicitly set # # Determine if any linters were explicitly set #
@ -96,6 +98,7 @@ function GetValidationInfo() {
$VALIDATE_GO || -n \ $VALIDATE_GO || -n \
$VALIDATE_TERRAFORM || -n \ $VALIDATE_TERRAFORM || -n \
$VALIDATE_POWERSHELL || -n \ $VALIDATE_POWERSHELL || -n \
$VALIDATE_ARM || -n \
$VALIDATE_CSS || -n \ $VALIDATE_CSS || -n \
$VALIDATE_ENV || -n \ $VALIDATE_ENV || -n \
$VALIDATE_CLOJURE || -n \ $VALIDATE_CLOJURE || -n \
@ -103,6 +106,7 @@ function GetValidationInfo() {
$VALIDATE_OPENAPI || -n \ $VALIDATE_OPENAPI || -n \
$VALIDATE_KOTLIN || -n \ $VALIDATE_KOTLIN || -n \
$VALIDATE_EDITORCONFIG ]]; then $VALIDATE_EDITORCONFIG ]]; then
$VALIDATE_HTML ]]; then
ANY_SET="true" ANY_SET="true"
fi fi
@ -372,6 +376,20 @@ function GetValidationInfo() {
VALIDATE_POWERSHELL="true" VALIDATE_POWERSHELL="true"
fi fi
###################################
# Validate if we should check ARM #
###################################
if [[ "$ANY_SET" == "true" ]]; then
# Some linter flags were set - only run those set to true
if [[ -z "$VALIDATE_ARM" ]]; then
# ARM flag was not set - default to false
VALIDATE_ARM="false"
fi
else
# No linter flags were set - default all to true
VALIDATE_ARM="true"
fi
################################### ###################################
# Validate if we should check CSS # # Validate if we should check CSS #
################################### ###################################
@ -470,6 +488,20 @@ function GetValidationInfo() {
VALIDATE_EDITORCONFIG="true" VALIDATE_EDITORCONFIG="true"
fi fi
####################################
# Validate if we should check HTML #
####################################
if [[ $ANY_SET == "true" ]]; then
# Some linter flags were set - only run those set to true
if [[ -z $VALIDATE_HTML ]]; then
# HTML flag was not set - default to false
VALIDATE_HTML="false"
fi
else
# No linter flags were set - default all to true
VALIDATE_HTML="true"
fi
####################################### #######################################
# Print which linters we are enabling # # Print which linters we are enabling #
####################################### #######################################
@ -568,6 +600,11 @@ function GetValidationInfo() {
else else
PRINT_ARRAY+=("- Excluding [POWERSHELL] files in code base...") PRINT_ARRAY+=("- Excluding [POWERSHELL] files in code base...")
fi fi
if [[ $VALIDATE_ARM == "true" ]]; then
PRINT_ARRAY+=("- Validating [ARM] files in code base...")
else
PRINT_ARRAY+=("- Excluding [ARM] files in code base...")
fi
if [[ $VALIDATE_CSS == "true" ]]; then if [[ $VALIDATE_CSS == "true" ]]; then
PRINT_ARRAY+=("- Validating [CSS] files in code base...") PRINT_ARRAY+=("- Validating [CSS] files in code base...")
else else
@ -603,6 +640,11 @@ function GetValidationInfo() {
else else
PRINT_ARRAY+=("- Excluding [EDITORCONFIG] files in code base...") PRINT_ARRAY+=("- Excluding [EDITORCONFIG] files in code base...")
fi fi
if [[ $VALIDATE_HTML == "true" ]]; then
PRINT_ARRAY+=("- Validating [HTML] files in code base...")
else
PRINT_ARRAY+=("- Excluding [HTML] files in code base...")
fi
############################## ##############################
# Validate Ansible Directory # # Validate Ansible Directory #

View file

@ -55,8 +55,7 @@ function LintCodebase() {
else else
# Success # Success
if [[ $ACTIONS_RUNNER_DEBUG == "true" ]]; then if [[ $ACTIONS_RUNNER_DEBUG == "true" ]]; then
echo -e "${NC}${F[B]}Successfully found binary for ${F[W]}[$LINTER_NAME]${F[B]} in system${NC}" echo -e "${NC}${F[B]}Successfully found binary for ${F[W]}[$LINTER_NAME]${F[B]} in system location: ${F[W]}[$VALIDATE_INSTALL_CMD]${NC}"
echo "Location:[$VALIDATE_INSTALL_CMD]"
fi fi
fi fi
@ -156,17 +155,19 @@ function LintCodebase() {
#################### ####################
LINT_CMD='' LINT_CMD=''
####################################### ####################################
# Corner case for Powershell subshell # # Corner case for pwsh subshell #
####################################### # - PowerShell (PSScriptAnalyzer) #
if [[ $FILE_TYPE == "POWERSHELL" ]]; then # - ARM (arm-ttk) #
####################################
if [[ $FILE_TYPE == "POWERSHELL" ]] || [[ $FILE_TYPE == "ARM" ]]; then
################################ ################################
# Lint the file with the rules # # Lint the file with the rules #
################################ ################################
# Need to run PowerShell commands using pwsh -c, also exit with exit code from inner subshell # Need to run PowerShell commands using pwsh -c, also exit with exit code from inner subshell
LINT_CMD=$( LINT_CMD=$(
cd "$GITHUB_WORKSPACE" || exit cd "$GITHUB_WORKSPACE" || exit
pwsh -c "($LINTER_COMMAND $FILE)" pwsh -NoProfile -NoLogo -Command "$LINTER_COMMAND $FILE; if (\$Error.Count) { exit 1 }"
exit $? 2>&1 exit $? 2>&1
) )
else else
@ -248,8 +249,7 @@ function TestCodebase() {
exit 1 exit 1
else else
# Success # Success
echo -e "${NC}${F[B]}Successfully found binary in system${NC}" echo -e "${NC}${F[B]}Successfully found binary for ${F[W]}[$LINTER_NAME]${F[B]} in system location: ${F[W]}[$VALIDATE_INSTALL_CMD]${NC}"
echo "Location:[$VALIDATE_INSTALL_CMD]"
fi fi
########################## ##########################
@ -334,14 +334,14 @@ function TestCodebase() {
cd "$GITHUB_WORKSPACE/$TEST_CASE_FOLDER/$INDVIDUAL_TEST_FOLDER" || exit cd "$GITHUB_WORKSPACE/$TEST_CASE_FOLDER/$INDVIDUAL_TEST_FOLDER" || exit
$LINTER_COMMAND "$FILE" 2>&1 $LINTER_COMMAND "$FILE" 2>&1
) )
elif [[ $FILE_TYPE == "POWERSHELL" ]]; then elif [[ $FILE_TYPE == "POWERSHELL" ]] || [[ $FILE_TYPE == "ARM" ]]; then
################################ ################################
# Lint the file with the rules # # Lint the file with the rules #
################################ ################################
# Need to run PowerShell commands using pwsh -c, also exit with exit code from inner subshell # Need to run PowerShell commands using pwsh -c, also exit with exit code from inner subshell
LINT_CMD=$( LINT_CMD=$(
cd "$GITHUB_WORKSPACE/$TEST_CASE_FOLDER" || exit cd "$GITHUB_WORKSPACE/$TEST_CASE_FOLDER" || exit
pwsh -c "($LINTER_COMMAND $FILE)" pwsh -NoProfile -NoLogo -Command "$LINTER_COMMAND $FILE; if (\$Error.Count) { exit 1 }"
exit $? 2>&1 exit $? 2>&1
) )
else else
@ -470,13 +470,15 @@ function RunTestCases() {
TestCodebase "ANSIBLE" "ansible-lint" "ansible-lint -v -c $ANSIBLE_LINTER_RULES" ".*\.\(yml\|yaml\)\$" "ansible" TestCodebase "ANSIBLE" "ansible-lint" "ansible-lint -v -c $ANSIBLE_LINTER_RULES" ".*\.\(yml\|yaml\)\$" "ansible"
TestCodebase "TERRAFORM" "tflint" "tflint -c $TERRAFORM_LINTER_RULES" ".*\.\(tf\)\$" "terraform" TestCodebase "TERRAFORM" "tflint" "tflint -c $TERRAFORM_LINTER_RULES" ".*\.\(tf\)\$" "terraform"
TestCodebase "CFN" "cfn-lint" "cfn-lint --config-file $CFN_LINTER_RULES" ".*\.\(json\|yml\|yaml\)\$" "cfn" TestCodebase "CFN" "cfn-lint" "cfn-lint --config-file $CFN_LINTER_RULES" ".*\.\(json\|yml\|yaml\)\$" "cfn"
TestCodebase "POWERSHELL" "pwsh" "pwsh -c Invoke-ScriptAnalyzer -EnableExit -Settings $POWERSHELL_LINTER_RULES -Path" ".*\.\(ps1\|psm1\|psd1\|ps1xml\|pssc\|psrc\|cdxml\)\$" "powershell" TestCodebase "POWERSHELL" "pwsh" "Invoke-ScriptAnalyzer -EnableExit -Settings $POWERSHELL_LINTER_RULES -Path" ".*\.\(ps1\|psm1\|psd1\|ps1xml\|pssc\|psrc\|cdxml\)\$" "powershell"
TestCodebase "ARM" "arm-ttk" "Import-Module $ARM_TTK_PSD1 ; \$config = \$(Import-PowerShellDataFile -Path $ARM_LINTER_RULES) ; Test-AzTemplate @config -TemplatePath" ".*\.\(json\)\$" "arm"
TestCodebase "CSS" "stylelint" "stylelint --config $CSS_LINTER_RULES" ".*\.\(css\)\$" "css" TestCodebase "CSS" "stylelint" "stylelint --config $CSS_LINTER_RULES" ".*\.\(css\)\$" "css"
TestCodebase "ENV" "dotenv-linter" "dotenv-linter" ".*\.\(env\)\$" "env" TestCodebase "ENV" "dotenv-linter" "dotenv-linter" ".*\.\(env\)\$" "env"
TestCodebase "CLOJURE" "clj-kondo" "clj-kondo --config $CLOJURE_LINTER_RULES --lint" ".*\.\(clj\|cljs\|cljc\|edn\)\$" "clojure" TestCodebase "CLOJURE" "clj-kondo" "clj-kondo --config $CLOJURE_LINTER_RULES --lint" ".*\.\(clj\|cljs\|cljc\|edn\)\$" "clojure"
TestCodebase "KOTLIN" "ktlint" "ktlint" ".*\.\(kt\|kts\)\$" "kotlin" TestCodebase "KOTLIN" "ktlint" "ktlint" ".*\.\(kt\|kts\)\$" "kotlin"
TestCodebase "PROTOBUF" "protolint" "protolint lint --config_path $PROTOBUF_LINTER_RULES" ".*\.\(proto\)\$" "protobuf" TestCodebase "PROTOBUF" "protolint" "protolint lint --config_path $PROTOBUF_LINTER_RULES" ".*\.\(proto\)\$" "protobuf"
TestCodebase "OPENAPI" "spectral" "spectral lint -r $OPENAPI_LINTER_RULES" ".*\.\(ymlopenapi\|jsonopenapi\)\$" "openapi" TestCodebase "OPENAPI" "spectral" "spectral lint -r $OPENAPI_LINTER_RULES" ".*\.\(ymlopenapi\|jsonopenapi\)\$" "openapi"
TestCodebase "HTML" "htmlhint" "htmlhint --config $HTML_LINTER_RULES" ".*\.\(html\)\$" "html"
################# #################
# Footer prints # # Footer prints #

545
package-lock.json generated Normal file
View file

@ -0,0 +1,545 @@
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"@types/color-name": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
"integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ=="
},
"ajv": {
"version": "6.12.3",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz",
"integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==",
"requires": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
}
},
"ansi-styles": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"requires": {
"@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
}
},
"asn1": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
"integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
"requires": {
"safer-buffer": "~2.1.0"
}
},
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
},
"async": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz",
"integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw=="
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
},
"aws4": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz",
"integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA=="
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"bcrypt-pbkdf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
"integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
"requires": {
"tweetnacl": "^0.14.3"
}
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"chalk": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz",
"integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==",
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"commander": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz",
"integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg=="
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
"requires": {
"assert-plus": "^1.0.0"
}
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"ecc-jsbn": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
"integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
"requires": {
"jsbn": "~0.1.0",
"safer-buffer": "^2.1.0"
}
},
"extend": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
},
"extsprintf": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
},
"fast-deep-equal": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
},
"fast-json-stable-stringify": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
},
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
},
"form-data": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
"integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.6",
"mime-types": "^2.1.12"
}
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"getpass": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
"requires": {
"assert-plus": "^1.0.0"
}
},
"glob": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"glob-base": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz",
"integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=",
"requires": {
"glob-parent": "^2.0.0",
"is-glob": "^2.0.0"
}
},
"glob-parent": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
"integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=",
"requires": {
"is-glob": "^2.0.0"
}
},
"har-schema": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
},
"har-validator": {
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz",
"integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==",
"requires": {
"ajv": "^6.5.5",
"har-schema": "^2.0.0"
}
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
},
"htmlhint": {
"version": "0.14.1",
"resolved": "https://registry.npmjs.org/htmlhint/-/htmlhint-0.14.1.tgz",
"integrity": "sha512-VWKrljlwF8tEKH48YPfC30zYKhrsMqm70d7vXswivEqd3DSva8ZlIzfeCa3YWFEFRIIhiXKgKurlqEpCtYMCAA==",
"dev": true,
"requires": {
"async": "3.2.0",
"chalk": "4.0.0",
"commander": "5.1.0",
"glob": "7.1.6",
"parse-glob": "3.0.4",
"request": "2.88.2",
"strip-json-comments": "3.1.0",
"xml": "1.0.1"
}
},
"http-signature": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
"requires": {
"assert-plus": "^1.0.0",
"jsprim": "^1.2.2",
"sshpk": "^1.7.0"
}
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"requires": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"is-dotfile": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz",
"integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE="
},
"is-extglob": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
"integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA="
},
"is-glob": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
"integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
"requires": {
"is-extglob": "^1.0.0"
}
},
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
},
"isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
},
"jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
},
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
},
"json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
},
"json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
},
"jsprim": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.3.0",
"json-schema": "0.2.3",
"verror": "1.10.0"
}
},
"mime-db": {
"version": "1.44.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
"integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
},
"mime-types": {
"version": "2.1.27",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
"integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
"requires": {
"mime-db": "1.44.0"
}
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"requires": {
"brace-expansion": "^1.1.7"
}
},
"oauth-sign": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"requires": {
"wrappy": "1"
}
},
"parse-glob": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz",
"integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=",
"requires": {
"glob-base": "^0.3.0",
"is-dotfile": "^1.0.0",
"is-extglob": "^1.0.0",
"is-glob": "^2.0.0"
}
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"psl": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
"integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
},
"punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
"qs": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
},
"request": {
"version": "2.88.2",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
"integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
"requires": {
"aws-sign2": "~0.7.0",
"aws4": "^1.8.0",
"caseless": "~0.12.0",
"combined-stream": "~1.0.6",
"extend": "~3.0.2",
"forever-agent": "~0.6.1",
"form-data": "~2.3.2",
"har-validator": "~5.1.3",
"http-signature": "~1.2.0",
"is-typedarray": "~1.0.0",
"isstream": "~0.1.2",
"json-stringify-safe": "~5.0.1",
"mime-types": "~2.1.19",
"oauth-sign": "~0.9.0",
"performance-now": "^2.1.0",
"qs": "~6.5.2",
"safe-buffer": "^5.1.2",
"tough-cookie": "~2.5.0",
"tunnel-agent": "^0.6.0",
"uuid": "^3.3.2"
}
},
"safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
},
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"sshpk": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
"integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
"requires": {
"asn1": "~0.2.3",
"assert-plus": "^1.0.0",
"bcrypt-pbkdf": "^1.0.0",
"dashdash": "^1.12.0",
"ecc-jsbn": "~0.1.1",
"getpass": "^0.1.1",
"jsbn": "~0.1.0",
"safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0"
}
},
"strip-json-comments": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz",
"integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w=="
},
"supports-color": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
"integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
"requires": {
"has-flag": "^4.0.0"
}
},
"tough-cookie": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
"integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
"requires": {
"psl": "^1.1.28",
"punycode": "^2.1.1"
}
},
"tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
"requires": {
"safe-buffer": "^5.0.1"
}
},
"tweetnacl": {
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
},
"uri-js": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
"integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
"requires": {
"punycode": "^2.1.0"
}
},
"uuid": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
},
"verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
"requires": {
"assert-plus": "^1.0.0",
"core-util-is": "1.0.2",
"extsprintf": "^1.2.0"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"xml": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz",
"integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU="
}
}
}