Skip to content

Commit

Permalink
feat(lint): Linting updates and clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
woll0r committed May 18, 2023
1 parent 21823ef commit 817f086
Show file tree
Hide file tree
Showing 14 changed files with 389 additions and 86 deletions.
14 changes: 14 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
exclude_paths:
- mkdocs.yaml
- hack/
- cluster/

skip_list:
- yaml[line-length]
- var-naming
warn_list:
- command-instead-of-shell
- deprecated-command-syntax
- experimental
- no-changed-when
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[Makefile]
indent_style = tab

[*.{bash,sh}]
indent_style = space
indent_size = 4
6 changes: 3 additions & 3 deletions .github/PAUL.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ pull_requests:
automated_merge: false
# The time in days after a PR should be labeled inactive
stale_time: 15
# This will limit the amount of PR's a single contributer can have
# This will limit the amount of PR's a single contributor can have
# Limits work in progress
#limit_pull_requests:
# limit_pull_requests:
# max_number: 3
# This is the message that will displayed when a user opens a pull request
#open_message: |
# open_message: |
# Greetings! Thanks for opening a PR
# Enables the /cat command
cats_enabled: true
Expand Down
279 changes: 279 additions & 0 deletions .github/linters/.cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,279 @@
{
"ignorePaths": [
"**/node_modules/**",
"**/vscode-extension/**",
"**/.git/**",
"**/.pnpm-lock.json",
".vscode",
"package-lock.json",
"megalinter-reports"
],
"language": "en",
"version": "0.2",
"words": [
"AAAAC",
"AAAAIHYT",
"ASMT",
"AUTHENTIK",
"Apiserver",
"Authentik",
"Autodetection",
"Autoscaler",
"CAYH",
"Ceph",
"DFNEAF",
"DOTENV",
"Dataplane",
"Datasources",
"Filesystems",
"JSONLINT",
"KOPIA",
"KUBECONFIG",
"KUBECONFORM",
"KUBEVAL",
"KURED",
"Kured",
"Kustomization",
"Kustomizations",
"LIDARR",
"MARKDOWNLINT",
"MINIO",
"PROWLARR",
"Pozo",
"QBITTORRENT",
"RADARR",
"RESTIC",
"Relabelings",
"Restic",
"Roboto",
"SATA",
"SIGNUPS",
"SONARR",
"Snapshotter",
"Taskfile",
"Thanos",
"Tigera",
"Vandevenne",
"Whitebox",
"Woll",
"agekey",
"alertmanager",
"alertmanagerconfigs",
"alertmanagers",
"alertname",
"amhost",
"apiserver",
"arithmatex",
"arpa",
"authentik",
"automaed",
"automerge",
"autoremove",
"autoupdate",
"backube",
"bargauge",
"bazarr",
"beryju",
"betterem",
"bgpconfiguration",
"bgppeer",
"bitnami",
"blackbox",
"blkdiscard",
"blockinfile",
"blockpool",
"bucketweb",
"cainjector",
"ceph",
"certmanager",
"cloudflared",
"cloudnative",
"cmds",
"cnpg",
"cpuid",
"crds",
"daemonset",
"dashboardproviders",
"dataplane",
"datasource",
"datasources",
"dbname",
"deliveryheroio",
"descheduler",
"dind",
"direnv",
"disabledsources",
"distro",
"dmsetup",
"dnla",
"dotglob",
"dsync",
"dyff",
"envsubst",
"flot",
"fluxcd",
"fontawesome",
"fstrim",
"fullname",
"gitops",
"gnet",
"goauthentik",
"gotk",
"hdparm",
"helmrelease",
"helmreleases",
"hifis",
"homeport",
"hyperconverged",
"ignoreceph",
"initdb",
"inlinehilite",
"inodes",
"inorder",
"inotify",
"ipvsadm",
"jetstack",
"jsonschema",
"kopia",
"kubeconfig",
"kubelet",
"kubereboot",
"kubeval",
"kured",
"kustomization",
"kustomizations",
"kustomize",
"kyverno",
"leaderelection",
"leaseduration",
"letsencrypt",
"lidarr",
"linewidth",
"looseversioning",
"lwolf",
"magiclink",
"markdownlint",
"materialx",
"mhausenblas",
"mkdocs",
"msdosfs",
"natel",
"netfilter",
"noqa",
"noreply",
"notin",
"nscc",
"nvme",
"objectbucket",
"objstore",
"oflag",
"onedr",
"osds",
"outsidecluster",
"overseerr",
"packagegroups",
"packagelabels",
"partprobe",
"piechart",
"podmonitor",
"podmonitors",
"pointradius",
"posix",
"postbuild",
"poweroff",
"precommit",
"prepareosd",
"procs",
"prometheuses",
"prometheusrule",
"prometheusrules",
"promhost",
"prowlarr",
"proxied",
"pymdownx",
"qbittorrent",
"quantile",
"radarr",
"rbdplugin",
"recyclarr",
"relabelings",
"renewdeadline",
"renovatebot",
"replicapool",
"replicationdestination",
"replicationdestinations",
"replicationsource",
"replicationsources",
"restic",
"resyncs",
"retryperiod",
"reviewdog",
"rgba",
"rsrc",
"runbook",
"scheduledbackup",
"schemafile",
"semanticcommits",
"servicelb",
"servicemonitor",
"servicemonitors",
"sgdisk",
"shellcheck",
"shjfqrsw",
"shopt",
"signin",
"signoff",
"signout",
"singlestat",
"smartquotes",
"smartsymbols",
"snapclass",
"snapshotter",
"socat",
"sonarr",
"sparkline",
"sslmode",
"stakater",
"statefulset",
"stefanzweifel",
"storegateway",
"summerwind",
"superfences",
"swapoff",
"swaptotal",
"taskfile",
"taskfiles",
"tasklist",
"tautulli",
"templating",
"thanos",
"thanosrulers",
"tigera",
"timepicker",
"timheuer",
"tmpl",
"toplevel",
"trackmap",
"traefik",
"twemoji",
"unmap",
"vaultwarden",
"vfat",
"volsync",
"vonage",
"wipefs",
"wkeqj",
"woll",
"worldmap",
"wsport",
"xanmanning",
"xaxis",
"xstg",
"yamlfmt",
"yaxes",
"yaxis",
"ymax",
"ymin",
"zzztest"
]
}
2 changes: 1 addition & 1 deletion .github/workflows/krr.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: krr

on:
on: # yamllint disable-line rule:truthy
workflow_dispatch:

env:
Expand Down
23 changes: 19 additions & 4 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,42 @@
# Configuration file for MegaLinter
# See all available variables at https://oxsecurity.github.io/megalinter/configuration/ and in linters documentation

FLAVOR_SUGGESTIONS: false
APPLY_FIXES: none # all, none, or list of linter keys
# ENABLE: # If you use ENABLE variable, all other languages/formats/tooling-formats will be disabled by default
ENABLE_LINTERS: # If you use ENABLE_LINTERS variable, all other linters will be disabled by default
- ACTION_ACTIONLINT
- ANSIBLE_ANSIBLE_LINT
- ENV_DOTENV_LINTER
- JSON_JSONLINT
- KUBERNETES_KUBEVAL
- KUBERNETES_KUBECONFORM
- MARKDOWN_MARKDOWNLINT
- MARKDOWN_MARKDOWN_LINK_CHECK
- YAML_YAMLLINT
DISABLE:
- COPYPASTE # Comment to enable checks of excessive copy-pastes
- SPELL # Comment to enable checks of spelling mistakes
- SPELL_CSPELL
- SPELL_MISSPELL

SHOW_ELAPSED_TIME: true
FILEIO_REPORTER: false
CLEAR_REPORT_FOLDER: true
# DISABLE_ERRORS: true # Uncomment if you want MegaLinter to detect errors but not block CI to pass

LINTER_RULES_PATH: .github/linters

KUBERNETES_DIRECTORY: cluster
KUBERNETES_KUBEVAL_ARGUMENTS: --ignore-missing-schemas
KUBERNETES_KUBEVAL_ARGUMENTS: [--ignore-missing-schemas]
KUBERNETES_KUBECONFORM_ARGUMENTS: [--ignore-missing-schemas]

JSON_JSONLINT_FILE_EXTENSIONS: [.json, .json5]
JSON_JSONLINT_ARGUMENTS: [--mode, json5]

ANSIBLE_ANSIBLE_LINT_PRE_COMMANDS:
- command: pip3 install --user --requirement ansible/requirements.txt
cwd: workspace
- command: ansible-galaxy install -r ansible/requirements.yml --roles-path ~/.ansible/roles --force
cwd: workspace
- command: ansible-galaxy collection install -r ansible/requirements.yml --collections-path ~/.ansible/collections --force
cwd: workspace

SPELL_FILTER_REGEX_EXCLUDE: (ansible|cluster)/.*\.sops\.ya?ml
Loading

0 comments on commit 817f086

Please sign in to comment.