diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 860a8fb..9bccb6e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,8 +1,8 @@ # Set update schedule for GitHub Actions version: 2 updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - # Check for updates to GitHub Actions every day - interval: "daily" +- package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every day + interval: "daily" diff --git a/.github/workflows/ci-check-gomod-alt.yml b/.github/workflows/ci-check-gomod-alt.yml index c8c467f..e57a5f4 100644 --- a/.github/workflows/ci-check-gomod-alt.yml +++ b/.github/workflows/ci-check-gomod-alt.yml @@ -4,10 +4,10 @@ name: ci-check-gomod # same name on: pull_request: paths-ignore: - - 'go.mod' + - 'go.mod' jobs: gomodreplacements: name: go.mod replacements runs-on: ubuntu-20.04 steps: - - run: 'echo "No check required" ' + - run: 'echo "No check required" ' diff --git a/.github/workflows/ci-check-gomod.yml b/.github/workflows/ci-check-gomod.yml index 5f2e595..513a359 100644 --- a/.github/workflows/ci-check-gomod.yml +++ b/.github/workflows/ci-check-gomod.yml @@ -2,9 +2,9 @@ name: ci-check-gomod on: pull_request: branches: - - master + - master paths: - - 'go.mod' + - 'go.mod' jobs: gomodreplacements: @@ -13,7 +13,7 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - + - name: check run: | if [[ -n "$(grep 'replace github.com/kubesaw/.*' go.mod || true)" ]]; then diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 40aefe7..6659aa5 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -2,19 +2,19 @@ name: ci-build on: push: branches: - - master + - master tags-ignore: - - '*.*' + - '*.*' pull_request: branches: - - master + - master jobs: test: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest] + os: [ ubuntu-latest ] name: Test on ${{ matrix.os }} steps: @@ -53,16 +53,16 @@ jobs: golangci: name: GolangCI Lint runs-on: ubuntu-latest - + steps: - name: Install Go uses: actions/setup-go@v5 with: go-version: 1.20.x - + - name: Checkout code uses: actions/checkout@v4 - + - name: Lint uses: golangci/golangci-lint-action@v4 with: @@ -70,15 +70,15 @@ jobs: skip-pkg-cache: true skip-build-cache: true args: --config=./.golangci.yml --verbose - + yammlint: name: YAML Lint runs-on: ubuntu-latest - + steps: - name: Checkout code uses: actions/checkout@v4 - + - name: Install yamllint run: pip install yamllint diff --git a/.golangci.yml b/.golangci.yml index 50fd943..208602b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,7 +1,7 @@ service: project-path: github.com/kubesaw/ksctl prepare: # see https://github.com/golangci/golangci/wiki/Configuration#config-directives - - make generate + - make generate run: # timeout for analysis, e.g. 30s, 5m, default is 1m @@ -10,20 +10,20 @@ run: linters: enable: - - megacheck - - gocyclo - - gofmt - - revive - - misspell - - gosec + - megacheck + - gocyclo + - gofmt + - revive + - misspell + - gosec presets: # groups of linters. See https://golangci-lint.run/usage/linters/ - - bugs - - unused - disable: - - golint # deprecated, use 'revive' - - scopelint # deprecated, use 'exportloopref' - - contextcheck # too many false-positives - - noctx # not needed + - bugs + - unused + disable: + - golint # deprecated, use 'revive' + - scopelint # deprecated, use 'exportloopref' + - contextcheck # too many false-positives + - noctx # not needed # all available settings of specific linters linters-settings: @@ -35,5 +35,5 @@ linters-settings: check-exported: true revive: rules: - - name: dot-imports - disabled: true + - name: dot-imports + disabled: true diff --git a/.yamllint b/.yamllint index 167a611..3ace27d 100644 --- a/.yamllint +++ b/.yamllint @@ -1,10 +1,11 @@ ignore: | /tmp /.git - + rules: braces: enable - brackets: enable + brackets: + level: warning colons: enable commas: enable comments: disable