From bff25518eb7ad47eb7488e63bd8eddc1f9d628c6 Mon Sep 17 00:00:00 2001 From: Dhruv Jain <92215138+jaydee029@users.noreply.github.com> Date: Fri, 8 Mar 2024 18:29:57 +0000 Subject: [PATCH] make doc changes Signed-off-by: Dhruv Jain <92215138+jaydee029@users.noreply.github.com> --- docs/docs/contribute/docs/markdownlint.md | 40 ++++++++++++++++ .../golangci-lint.md} | 46 ++----------------- mkdocs.yml | 3 +- 3 files changed, 46 insertions(+), 43 deletions(-) create mode 100644 docs/docs/contribute/docs/markdownlint.md rename docs/docs/contribute/{docs/linter-requirements.md => software/golangci-lint.md} (57%) diff --git a/docs/docs/contribute/docs/markdownlint.md b/docs/docs/contribute/docs/markdownlint.md new file mode 100644 index 0000000000..1776f932e3 --- /dev/null +++ b/docs/docs/contribute/docs/markdownlint.md @@ -0,0 +1,40 @@ +--- +comments: true +--- + +# Markdownlint + +We are using [markdownlint](https://github.com/DavidAnson/markdownlint) to ensure consistent styling +within our Markdown files. +Specifically we are using [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli). + +> +We are using `GNU make` to ensure the same functionality locally and within our CI builds. +This should allow easier debugging and problem resolution. + +## Markdownlint execution + +To verify that your markdown code conforms to the rules, run the following on your local branch: + +```shell +make markdownlint +``` + +To use the auto-fix option, run: + +```shell +make markdownlint-fix +``` + +## Markdownlint Configuration + +We use the default configuration values for `markdownlint`. + +This means: + +[.markdownlint-cli2.yaml](https://github.com/keptn/lifecycle-toolkit/blob/main/.markdownlint-cli2.yaml) +contains the rule configuration + +We use the default values, so tools like +[markdownlint for VSCode](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint) +can be used without additional configuration. diff --git a/docs/docs/contribute/docs/linter-requirements.md b/docs/docs/contribute/software/golangci-lint.md similarity index 57% rename from docs/docs/contribute/docs/linter-requirements.md rename to docs/docs/contribute/software/golangci-lint.md index 0c31e5127b..db9a5876e1 100644 --- a/docs/docs/contribute/docs/linter-requirements.md +++ b/docs/docs/contribute/software/golangci-lint.md @@ -2,18 +2,17 @@ comments: true --- -# Linter Requirements +# Golangci-lint -This project uses a set of linters to ensure good code quality. +This project uses Golangci-lint to ensure good code quality. In order to make proper use of those linters inside an IDE, the following configuration is required. -## Golangci-lint Further information can also be found in the [`golangci-lint` documentation](https://golangci-lint.run/usage/integrations/). -### Visual Studio Code +## Visual Studio Code In Visual Studio Code the [Golang](https://marketplace.visualstudio.com/items?itemName=aldijav.golangwithdidi) @@ -43,7 +42,7 @@ configuration file enables all linters used in this project. }, ``` -### GoLand / IntelliJ requirements +## GoLand / IntelliJ requirements * Install either the **GoLand** or **IntelliJ** Integrated Development Environment (IDE) for the Go programming language, plus the [Go Linter](https://plugins.jetbrains.com/plugin/12496-go-linter) plugin. @@ -61,40 +60,3 @@ If you are on Windows, you need to install **make** for the above process to com > **Note** When using the make command on Windows, you may receive an `unrecognized command` error for a command that is installed. This usually indicates that `PATH` for the binary is not set correctly). - -## Markdownlint - -We are using [markdownlint](https://github.com/DavidAnson/markdownlint) to ensure consistent styling -within our Markdown files. -Specifically we are using [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli). - -> -We are using `GNU make` to ensure the same functionality locally and within our CI builds. -This should allow easier debugging and problem resolution. - -### Markdownlint execution - -To verify that your markdown code conforms to the rules, run the following on your local branch: - -```shell -make markdownlint -``` - -To use the auto-fix option, run: - -```shell -make markdownlint-fix -``` - -### Markdownlint Configuration - -We use the default configuration values for `markdownlint`. - -This means: - -[.markdownlint-cli2.yaml](https://github.com/keptn/lifecycle-toolkit/blob/main/.markdownlint-cli2.yaml) -contains the rule configuration - -We use the default values, so tools like -[markdownlint for VSCode](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint) -can be used without additional configuration. diff --git a/mkdocs.yml b/mkdocs.yml index a9e19ccdf7..d3ccabb155 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -212,11 +212,12 @@ nav: - docs/contribute/software/index.md - Software development environment: docs/contribute/software/dev-environ.md - Add a metrics provider: docs/contribute/software/add-new-metric-provider.md + - Add Golangci-lint: docs/contribute/software/golangci-lint.md - Documentation contributions: - docs/contribute/docs/index.md - Contribution guidelines for documentation: docs/contribute/docs/contrib-guidelines-docs.md - Build Documentation Locally: docs/contribute/docs/local-building.md - - Linter Requirements: docs/contribute/docs/linter-requirements.md + - Markdown Linting: docs/contribute/docs/markdownlint.md - Source File Structure: docs/contribute/docs/source-file-structure.md - Coding the docs: docs/contribute/docs/code-docs.md - Spell Checker: docs/contribute/docs/spell-check.md