Skip to content

Commit

Permalink
chore: update and apply linters (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
pat-s authored Oct 6, 2024
1 parent 477b264 commit b42c009
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 5 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = true
22 changes: 22 additions & 0 deletions .editorconfig-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"Verbose": false,
"Debug": false,
"IgnoreDefaults": false,
"SpacesAftertabs": false,
"NoColor": false,
"Exclude": [
"LICENSE",
".git/",
"Makefile"
],
"AllowedContentTypes": [],
"PassedFiles": [],
"Disable": {
"EndOfLine": false,
"Indentation": false,
"IndentSize": false,
"InsertFinalNewline": false,
"TrimTrailingWhitespace": false,
"MaxLineLength": false
}
}
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
charts/woodpecker/templates/
charts/woodpecker/server/templates/
charts/woodpecker/agent/templates/
values.yaml
33 changes: 33 additions & 0 deletions .woodpecker/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
when:
- event: tag
- event: push
branch: main
- event: pull_request

steps:
lint-markdown:
depends_on: []
image: docker.io/davidanson/markdownlint-cli2:v0.14.0
commands:
- 'markdownlint-cli2 *.{md,markdown}'

editor-config:
image: docker.io/mstruebing/editorconfig-checker:v3.0.3
depends_on: []
commands:
- ec --config .editorconfig-checker.json .

helm-lint:
image: docker.io/alpine/helm:3.16.1
depends_on: []
commands:
- helm dependency update charts/woodpecker
- helm lint --with-subcharts charts/*

lint-yaml:
image: docker.io/pipelinecomponents/yamllint:0.32.1
depends_on: []
commands:
- yamllint .
when:
path: '*.{yml,yaml}'
5 changes: 2 additions & 3 deletions .woodpecker/release-helper.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
when:
event: push
branch:
${CI_REPO_DEFAULT_BRANCH}
branch: ${CI_REPO_DEFAULT_BRANCH}

steps:
release-helper:
image: woodpeckerci/plugin-ready-release-go:2.0.0
image: docker.io/woodpeckerci/plugin-ready-release-go:2.0.0
pull: true
settings:
release_branch: ${CI_REPO_DEFAULT_BRANCH}
Expand Down
4 changes: 2 additions & 2 deletions .woodpecker/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ steps:
- event: tag

update-readme:
image: jnorwood/helm-docs:v1.14.2
image: docker.io/jnorwood/helm-docs:v1.14.2
commands:
- helm-docs
- cat charts/woodpecker/README.md

push-readme:
image: appleboy/drone-git-push:1.1.0
image: docker.io/appleboy/drone-git-push:1.1.0
settings:
remote: ssh://[email protected]/woodpecker-ci/helm.git
branch: main
Expand Down
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@
docs:
helm-docs

lint-markdown:
markdownlint-cli2 *.{md,markdown}

lint-yaml:
yamllint --strict -f colored .

lint-editorconfig:
editorconfig-checker --config .editorconfig-checker.json .

lint-helm:
helm lint --with-subcharts charts/*

.PHONY: lint
lint: lint-helm lint-yaml lint-markdown lint-editorconfig

.PHONY: test
test:
helm unittest --strict -f 'unittests/**/*.yaml' ./charts/woodpecker/

0 comments on commit b42c009

Please sign in to comment.