-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Swap yaml-lint for mega-linter Fixes #6 * Adjust mega linter config * add mega-linter config files * Added prettier config
- Loading branch information
Showing
7 changed files
with
108 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
default: true | ||
|
||
# MD013/line-length - Line length | ||
MD013: | ||
# Number of characters | ||
line_length: 240 | ||
# Number of characters for headings | ||
heading_line_length: 80 | ||
# Number of characters for code blocks | ||
code_block_line_length: 80 | ||
# Include code blocks | ||
code_blocks: true | ||
# Include tables | ||
tables: true | ||
# Include headings | ||
headings: true | ||
# Include headings | ||
headers: true | ||
# Strict length checking | ||
strict: false | ||
# Stern length checking | ||
stern: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
# https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml | ||
# MD013/line-length - Line length | ||
MD013: false | ||
|
||
# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content | ||
MD024: | ||
# Only check sibling headings | ||
allow_different_nesting: true | ||
# Only check sibling headings | ||
siblings_only: true | ||
|
||
# MD033/no-inline-html - Inline HTML | ||
MD033: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
printWidth: 140 | ||
semi: false | ||
singleQuote: false | ||
trailingComma: "es5" | ||
tabWidth: 2 | ||
useTabs: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | ||
name: MegaLinter | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: ["main", "master"] | ||
|
||
pull_request: | ||
branches: ["main", "master"] | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
megalinter: | ||
name: MegaLinter | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
issues: write | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# https://megalinter.io/latest/supported-linters/ | ||
# https://megalinter.io/7.11.1/flavors/terraform/ | ||
- name: MegaLinter | ||
# Terraform image is much smaller than default image | ||
uses: oxsecurity/megalinter/flavors/[email protected] | ||
env: | ||
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'workflow_dispatch' }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ENABLE_LINTERS: |- | ||
${{ | ||
join( | ||
fromJSON(' | ||
[ | ||
"BASH_SHELLCHECK", | ||
"MARKDOWN_MARKDOWNLINT", | ||
"REPOSITORY_GIT_DIFF", | ||
"REPOSITORY_SECRETLINT", | ||
"YAML_YAMLLINT", | ||
"YAML_PRETTIER", | ||
] | ||
'), | ||
',' | ||
) | ||
}} | ||
MARKDOWN_MARKDOWNLINT_CONFIG_FILE: .ci/markdownlint/markdownlint.config.yaml | ||
MARKDOWN_MARKDOWNLINT_RULES_PATH: .ci/markdownlint/ | ||
YAML_YAMLLINT_CONFIG_FILE: .ci/yamllint/.yamllint.yaml | ||
YAML_PRETTIER_CONFIG_FILE: .ci/prettier/.prettierrc.yaml | ||
YAML_PRETTIER_ARGUMENTS: --ignore-path .ci/prettier/.prettierignore |