Skip to content

Commit

Permalink
docs: move golangci-lint info to contribute/software (#3368)
Browse files Browse the repository at this point in the history
Signed-off-by: Meg McRoberts <meg.mcroberts@dynatrace.com>
Co-authored-by: odubajDT <93584209+odubajDT@users.noreply.github.com>
  • Loading branch information
StackScribe and odubajDT committed Mar 29, 2024
1 parent 19163f7 commit a3d48eb
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 48 deletions.
2 changes: 1 addition & 1 deletion docs/docs/contribute/docs/contrib-guidelines-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ that are relevant only to documentation.
make markdownlint-fix
```

See [Markdownlint](./linter-requirements.md#markdownlint)
See [markdownlint](./markdownlint.md)
for details.
47 changes: 47 additions & 0 deletions docs/docs/contribute/docs/markdownlint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
comments: true
---

# Markdownlint

Keptn uses
[markdownlint](https://github.com/DavidAnson/markdownlint)
to ensure consistent styling within all our markdown files,
including files outside the documentation NAV path
such as `README.md` files..
Specifically, we are using
[markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli).

This page tells how to use markdownlint.

>
We use `GNU make` to ensure the same functionality locally and within our CI builds.
This allows 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.
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@
comments: true
---

# Linter Requirements
# Golangci-lint configuration

This project uses a set of linters to ensure good code quality.
In order to make proper use of those linters inside an IDE,
the following configuration is required.
Kept uses the `Golangci-lint` linter to ensure good code quality.
This page describes the configuration required
to make proper use of those linters inside an IDE.

## Golangci-lint

Further information can also be found in
Further information can be found in
the [`golangci-lint` documentation](https://golangci-lint.run/welcome/integrations/).

### Visual Studio Code
## Visual Studio Code

In Visual Studio Code the
[Golang](https://marketplace.visualstudio.com/items?itemName=aldijav.golangwithdidi)
Expand Down Expand Up @@ -43,7 +41,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.
Expand All @@ -61,40 +59,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.
4 changes: 4 additions & 0 deletions docs/docs/contribute/software/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ This section includes:
where you can develop and test software contributions.
It includes a video walkthrough that illustrates the process.

- [Golangci-lint configuration](golangci-lint.md)
discusses the linter Keptn uses to ensure good code quality
and how to configure your local development environment to use it.

- [Add a metrics provider](add-new-metric-provider.md)
explains how to add support for a new metrics provider to Keptn.
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,13 @@ nav:
- Software contributions:
- docs/contribute/software/index.md
- Software development environment: docs/contribute/software/dev-environ.md
- Golangci-lint configuration: docs/contribute/software/golangci-lint.md
- Add a metrics provider: docs/contribute/software/add-new-metric-provider.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
- Using markdownlint: 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
Expand Down

0 comments on commit a3d48eb

Please sign in to comment.