Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/lint-and-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: MegaLinter with Reviewdog Suggester
on:
pull_request:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
permissions: {}
jobs:
megalinter:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run MegaLinter
uses: oxsecurity/megalinter/flavors/terraform@v9.1.0
env:
APPLY_FIXES: all
APPLY_FIXES_EVENT: pull_request
APPLY_FIXES_MODE: no_commit
DISABLE_LINTERS: YAML_V8R,TERRAFORM_TERRASCAN,MARKDOWN_MARKDOWN_TABLE_FORMATTER
FLAVOR_SUGGESTIONS: false
ENABLE: YAML,TERRAFORM,MARKDOWN
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPORTERS: github_pr_review,github_suggestions,SARIF
REPORT_OUTPUT_FOLDER: megalinter-reports
VALIDATE_ALL_CODEBASE: false
- name: Archive MegaLinter reports
if: always()
uses: actions/upload-artifact@v4
with:
name: megalinter-reports
path: |
megalinter-reports
mega-linter.log
- name: List MegaLinter report files
if: always()
run: ls -l megalinter-reports || true
- name: Suggest fixes with reviewdog
if: always()
uses: reviewdog/action-suggester@v1
with:
tool_name: megalinter
github_token: ${{ secrets.GITHUB_TOKEN }}
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Comment on lines +1 to +49
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[megalinter] reported by reviewdog 🐶

Suggested change
name: MegaLinter with Reviewdog Suggester
on:
pull_request:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
permissions: {}
jobs:
megalinter:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run MegaLinter
uses: oxsecurity/megalinter/flavors/terraform@v9.1.0
env:
APPLY_FIXES: all
APPLY_FIXES_EVENT: pull_request
APPLY_FIXES_MODE: no_commit
DISABLE_LINTERS: YAML_V8R,TERRAFORM_TERRASCAN,MARKDOWN_MARKDOWN_TABLE_FORMATTER
FLAVOR_SUGGESTIONS: false
ENABLE: YAML,TERRAFORM,MARKDOWN
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPORTERS: github_pr_review,github_suggestions,SARIF
REPORT_OUTPUT_FOLDER: megalinter-reports
VALIDATE_ALL_CODEBASE: false
- name: Archive MegaLinter reports
if: always()
uses: actions/upload-artifact@v4
with:
name: megalinter-reports
path: |
megalinter-reports
mega-linter.log
- name: List MegaLinter report files
if: always()
run: ls -l megalinter-reports || true
- name: Suggest fixes with reviewdog
if: always()
uses: reviewdog/action-suggester@v1
with:
tool_name: megalinter
github_token: ${{ secrets.GITHUB_TOKEN }}
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: MegaLinter with Reviewdog Suggester
on:
pull_request:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
permissions: {}
jobs:
megalinter:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run MegaLinter
uses: oxsecurity/megalinter/flavors/terraform@v9.1.0
env:
APPLY_FIXES: all
APPLY_FIXES_EVENT: pull_request
APPLY_FIXES_MODE: no_commit
DISABLE_LINTERS: YAML_V8R,TERRAFORM_TERRASCAN,MARKDOWN_MARKDOWN_TABLE_FORMATTER
FLAVOR_SUGGESTIONS: false
ENABLE: YAML,TERRAFORM,MARKDOWN
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPORTERS: github_pr_review,github_suggestions,SARIF
REPORT_OUTPUT_FOLDER: megalinter-reports
VALIDATE_ALL_CODEBASE: false
- name: Archive MegaLinter reports
if: always()
uses: actions/upload-artifact@v4
with:
name: megalinter-reports
path: |
megalinter-reports
mega-linter.log
- name: List MegaLinter report files
if: always()
run: ls -l megalinter-reports || true
- name: Suggest fixes with reviewdog
if: always()
uses: reviewdog/action-suggester@v1
with:
tool_name: megalinter
github_token: ${{ secrets.GITHUB_TOKEN }}
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -532,4 +532,8 @@ FodyWeavers.xsd
### VisualStudio Patch ###
# Additional files built by Visual Studio

# End of https://www.toptal.com/developers/gitignore/api/terraform,dotnetcore,rider,visualstudiocode,visualstudio
# End of https://www.toptal.com/developers/gitignore/api/terraform,dotnetcore,rider,visualstudiocode,visualstudio

# Megalinter artefacts
.megareports/
megalinter-reports/
6 changes: 4 additions & 2 deletions sandbox/prerequisites/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ terraform {

required_providers {
azurerm = {
source = "hashicorp/azurerm"
source= "hashicorp/azurerm"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[megalinter] reported by reviewdog 🐶

Suggested change
source= "hashicorp/azurerm"
source = "hashicorp/azurerm"

version = ">= 3.7.0, < 5.0.0"
}
}



backend "local" {
path = "state/terraform.tfstate"
}
}
}