diff --git a/.editorconfig b/.editorconfig index 35ae7b4..e699e2b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,9 +2,17 @@ # https://editor.timseverien.com/#config root = true +[*.{md}] +charset = utf-8 +end_of_line = lf +tab_width = 2 +trim_trailing_whitespace = true +max_line_length = 200 + [*.{yml,yaml}] charset = utf-8 end_of_line = lf insert_final_newline = true tab_width = 2 trim_trailing_whitespace = true +max_line_length = 200 diff --git a/.github/workflows/actions-lint.yaml b/.github/workflows/actions-lint.yaml new file mode 100644 index 0000000..17c717e --- /dev/null +++ b/.github/workflows/actions-lint.yaml @@ -0,0 +1,11 @@ +--- +on: push + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: rethab/actions-lint@v1 + with: + files: .github/workflows/deploy.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8978e9..2efbb1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,13 +1,28 @@ --- name: CI -on: # yamllint disable-line rule:truthy +on: push: jobs: ci-lint: runs-on: ubuntu-latest + strategy: + # if one fails continues running the others + fail-fast: true steps: - - uses: actions/checkout@v3 + - name: checkout + uses: actions/checkout@v3 + - name: yaml-lint uses: ibiqlik/action-yamllint@v3 + + - name: Vale Linter + uses: errata-ai/vale-action@v2.1.0 + + - name: typos-action + uses: crate-ci/typos@v1.21.0 + - name: EditorConfig-Action uses: zbeekman/EditorConfig-Action@v1.1.1 + + - name: markdownlint-cli2-action + uses: DavidAnson/markdownlint-cli2-action@v16.0.0 diff --git a/.github/workflows/spellchecker.yml b/.github/workflows/spellchecker.yml deleted file mode 100644 index 71708ac..0000000 --- a/.github/workflows/spellchecker.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: spell checking -on: # yamllint disable-line rule:truthy - push: - -jobs: - typos: - name: Spell Check with Typos - runs-on: ubuntu-latest - steps: - - name: Checkout Actions Repository - uses: actions/checkout@v4 - - name: typos-action - uses: crate-ci/typos@v1.21.0 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..549fbd5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +megalinter-reports/ diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 0000000..f3f500f --- /dev/null +++ b/.vale.ini @@ -0,0 +1,8 @@ +StylesPath = .vale/styles/ + +MinAlertLevel = suggestion + +Packages = RedHat + +[*.md] +BasedOnStyles = Vale, RedHat diff --git a/.vale/styles/README.md b/.vale/styles/README.md new file mode 100644 index 0000000..3aa69be --- /dev/null +++ b/.vale/styles/README.md @@ -0,0 +1,3 @@ +# Vale styles for repository + +Please examine the files \ No newline at end of file diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..12497b6 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,11 @@ +--- +extends: default + +# These files are imported by vale from an external repository +ignore: | + .vale/styles/RedHat/ +rules: + truthy: + # the node "on:" present in each GitHub Actions workflow file + ignore: | + .github/ diff --git a/02-safe/.golangci.yaml b/02-safe/.golangci.yaml new file mode 100644 index 0000000..00e63c1 --- /dev/null +++ b/02-safe/.golangci.yaml @@ -0,0 +1,25 @@ +--- +run: + tests: true + skip-dirs-use-default: true + +linters: + # some linters are enabled by default + # https://golangci-lint.run/usage/linters/ + # + # enable some extra linters + enable: + - gci + - revive + - thelper + +linters-settings: + # define the import orders + gci: + sections: + # Standard section: captures all standard packages. + - standard + # Default section: catchall that is not standard or custom + - default + # linters that related to local tool, so they should be separated + - localmodule diff --git a/02-safe/README.md b/02-safe/README.md new file mode 100644 index 0000000..918f096 --- /dev/null +++ b/02-safe/README.md @@ -0,0 +1,7 @@ +# Empty settings + +One way to use the default settings is to use `--no-config` parameter. + +Another is to create an empty YAML file + +See [.golangci.yaml](.golangci.yaml) diff --git a/README.md b/README.md index c7760b5..8d47112 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # golangci-lint-config-examples + These are .golangci.yml to go based on your need