add linter + renovate (#6)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/test-image Pipeline was successful

### 📖 Summary

- add renovate json
- add linters:
  - Dockerfile
  - markdown
  - editorconfig

### 📑 Test Plan

 CI pipeline tests (Default)

### 💬 Details

_No response_

### 📚 Additional Notes

_No response_

Reviewed-on: #6
This commit is contained in:
OCram85 2024-05-16 12:12:31 +02:00
parent 099ed06d66
commit b699580cc7
11 changed files with 75 additions and 33 deletions

View File

@ -1,14 +1,14 @@
root = true root = true
[*] [*]
indent_style = space indent_style = space
indent_size = 2 indent_size = 2
end_of_line = lf end_of_line = lf
charset = utf-8 charset = utf-8
trim_trailing_whitespace = true trim_trailing_whitespace = true
insert_final_newline = true insert_final_newline = true
[*.go] [*.go]
indent_style = tab indent_style = tab
indent_size = 4 indent_size = 4

3
.hadolint.yml Normal file
View File

@ -0,0 +1,3 @@
ignored:
- DL3018 # pin versions in Dockerfile
- DL3013 # pin pip versions in Dockerfile

8
.markdownlint.json Normal file
View File

@ -0,0 +1,8 @@
{
"default": true,
"MD013": {
"line_length": 116,
"code_block_line_length": 116,
"tables": false
}
}

View File

@ -1 +1,3 @@
gitea
Gitea
tbd tbd

View File

@ -5,6 +5,7 @@
"streetsidesoftware.code-spell-checker", "streetsidesoftware.code-spell-checker",
"streetsidesoftware.code-spell-checker-german", "streetsidesoftware.code-spell-checker-german",
"bierner.emojisense", "bierner.emojisense",
"ryanluker.vscode-coverage-gutters" "ryanluker.vscode-coverage-gutters",
"davidanson.vscode-markdownlint"
] ]
} }

19
.vscode/settings.json vendored
View File

@ -9,20 +9,6 @@
"editor.rulers": [ "editor.rulers": [
116 116
], ],
// powershell general
"powershell.startAutomatically": true,
"powershell.enableProfileLoading": true,
"powershell.scriptAnalysis.enable": true,
// powershell code Formatting
"powershell.codeFormatting.openBraceOnSameLine": true,
"powershell.codeFormatting.newLineAfterOpenBrace": true,
"powershell.codeFormatting.newLineAfterCloseBrace": true,
"powershell.codeFormatting.whitespaceBeforeOpenBrace": true,
"powershell.codeFormatting.whitespaceBeforeOpenParen": true,
"powershell.codeFormatting.whitespaceAroundOperator": true,
"powershell.codeFormatting.whitespaceAfterSeparator": true,
"powershell.codeFormatting.ignoreOneLineBlock": true,
"powershell.codeFormatting.alignPropertyValuePairs": true,
// cSpell settings for custom dictionary // cSpell settings for custom dictionary
"cSpell.enabled": true, "cSpell.enabled": true,
"cSpell.caseSensitive": false, "cSpell.caseSensitive": false,
@ -67,5 +53,10 @@
"addWords": true "addWords": true
}, },
"custom": true "custom": true
},
"[markdown]": {
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
} }
} }

3
.vscode/tasks.json vendored
View File

@ -6,7 +6,8 @@
"type": "shell", "type": "shell",
"command": [ "command": [
"mv 'CHANGELOG.md' 'CHANGELOG.back' &&", "mv 'CHANGELOG.md' 'CHANGELOG.back' &&",
"changelog -m '${input:Milestone}' --token '${input:GiteaToken}' -c .changelog.yml generate > CHANGELOG.md &&", "echo '<!-- markdownlint-disable MD041 -->' > CHANGELOG.md &&",
"changelog -m '${input:Milestone}' --token '${input:GiteaToken}' -c .changelog.yml generate >> CHANGELOG.md &&",
"echo '' >> CHANGELOG.md &&", "echo '' >> CHANGELOG.md &&",
"cat CHANGELOG.back >> CHANGELOG.md &&", "cat CHANGELOG.back >> CHANGELOG.md &&",
"rm CHANGELOG.back" "rm CHANGELOG.back"

View File

@ -26,6 +26,28 @@ variables:
from_secret: gitea_passwd from_secret: gitea_passwd
steps: steps:
lint-dockerfile:
image: hadolint/hadolint:v2.12.1-beta-alpine
commands:
#- cat Dockerfile
#- hadolint --verbose --ignore DL3003 --ignore DL3018 Dockerfile
- hadolint --ignore DL3003 --ignore DL3018 Dockerfile
#when:
# path: "Dockerfile"
lint-markdown:
image: davidanson/markdownlint-cli2:v0.13.0
commands:
- "markdownlint-cli2 *.{md,markdown}"
when:
path: "*.{md,markdown}"
lint-editorconfig:
depends_on: []
image: docker.io/mstruebing/editorconfig-checker:v3.0.1
when:
event: pull_request
test: test:
image: *build_plugin image: *build_plugin
settings: settings:

View File

@ -1,3 +1,4 @@
<!-- markdownlint-disable MD041 -->
## [v0.1.0](https://gitea.ocram85.com/plugins/gitea-package/releases/tag/v0.1.0) - 2024-05-14 ## [v0.1.0](https://gitea.ocram85.com/plugins/gitea-package/releases/tag/v0.1.0) - 2024-05-14
* 🐛 BUGFIXES * 🐛 BUGFIXES
@ -7,4 +8,3 @@
* Migrate content (#1) * Migrate content (#1)
* ⚙️ META * ⚙️ META
* Update Gitea meta files (#2) * Update Gitea meta files (#2)

View File

@ -1,6 +1,8 @@
<!-- markdownlint-disable MD033 MD041 -->
<p align="right"> <p align="right">
<img src="http://forthebadge.com/images/badges/built-with-love.svg"> <img src="http://forthebadge.com/images/badges/built-with-love.svg" alt="built-with-love">
<img src="http://forthebadge.com/images/badges/for-you.svg"> <img src="http://forthebadge.com/images/badges/for-you.svg" alt="for-you">
</p> </p>
<p align="center"> <p align="center">

12
renovate.json Normal file
View File

@ -0,0 +1,12 @@
{
"dependencyDashboard": true,
"docker": {
"enabled": true
},
"woodpecker": {
"enabled": true,
"fileMatch": [
"^.woodpecker\/.*.yml$"
]
}
}