Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
},
"vscode": {
"extensions": [
"mtxr.sqltools-driver-mysql",
"dorzey.vscode-sqlfluff",
"emeraldwalk.RunOnSave"
"gruntfuggly.triggertaskonsave",
"mtxr.sqltools-driver-mysql"
]
}
},
"postStartCommand": "sqlfluff fix",
"postAttachCommand": "sqlfluff fix -v",
"remoteUser": "vscode"
}
45 changes: 40 additions & 5 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ on:
- main
pull_request: null

permissions: {}
permissions:
contents: write
statuses: write

jobs:
build:
Expand All @@ -26,10 +28,43 @@ jobs:
fetch-depth: 0

- name: Super-linter
uses: super-linter/super-linter@v7
uses: super-linter/super-linter/slim@v7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: false
VALIDATE_JSON_PRETTIER: false
SQLFLUFF_CONFIG_FILE: .sqlfluff
FILTER_REGEX_EXCLUDE: "(.devcontainer/Dockerfile|.github/pull_request_template.md|.github/ISSUE_TEMPLATE/*.md)"
FILTER_REGEX_EXCLUDE: '(.devcontainer/Dockerfile|.github/pull_request_template.md|.github/ISSUE_TEMPLATE/*.md)'

fix-lint:
name: Fix Lint
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Super-linter
uses: super-linter/super-linter/slim@v7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: false
FILTER_REGEX_EXCLUDE: '(.github/pull_request_template.md|.github/ISSUE_TEMPLATE/*.md)'
FIX_JSON_PRETTIER: true
FIX_MARKDOWN: true
FIX_MARKDOWN_PRETTIER: true
FIX_SHELL_SHFMT: true
FIX_SQLFLUFF: true
FIX_YAML_PRETTIER: true
VALIDATE_DOCKERFILE_HADOLINT: false

- name: Commit and push linting fixes
if: >
github.event_name == 'pull_request' &&
github.event.pull_request.head.ref != github.event.repository.default_branch
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: ${{ github.event.pull_request.head.ref }}
commit_message: 'chore: fix linting issues'
commit_user_name: super-linter
commit_user_email: super-linter@super-linter.dev
16 changes: 16 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"overrides": [
{
"files": ["*.yml", "*.yaml", "*.md"],
"options": {
"tabWidth": 2
}
}
],
"printWidth": 80,
"semi": false,
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "es5",
"useTabs": false
}
13 changes: 3 additions & 10 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
{
"editor.rulers": [
100
],
"editor.rulers": [100],
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.formatOnSave": true,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"emeraldwalk.runonsave": {
"commands": [
{
"match": "*.sql",
"cmd": "sqlfluff fix '${fileBasename}'"
}
]
"triggerTaskOnSave.tasks": {
"Lint SQL File": ["**/*.sql"]
}
}
18 changes: 18 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Lint SQL File",
"type": "shell",
"command": "sqlfluff fix '${fileBasename}' -v",
"group": {
"kind": "none",
"isDefault": true
},
"problemMatcher": [],
"runOptions": {
"runOn": "default"
}
}
]
}
5 changes: 5 additions & 0 deletions github_conf/branch_protection_rules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"message": "Not Found",
"documentation_url": "https://docs.github.com/rest",
"status": "404"
}
15 changes: 15 additions & 0 deletions super-linter-output/super-linter-summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Super-linter summary

| Language | Validation result |
| -------------------------- | ----------------- |
| CHECKOV | Pass ✅ |
| GITHUB_ACTIONS | Pass ✅ |
| GITLEAKS | Pass ✅ |
| GIT_MERGE_CONFLICT_MARKERS | Pass ✅ |
| JSCPD | Pass ✅ |
| JSON | Pass ✅ |
| JSON_PRETTIER | Pass ✅ |
| YAML | Pass ✅ |
| YAML_PRETTIER | Pass ✅ |

All files and directories linted successfully