Skip to content

Commit

Permalink
docs: add linter instructions to README.md (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
bouassaba authored Jul 23, 2024
1 parent 03794b8 commit d612d3b
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 30 deletions.
26 changes: 17 additions & 9 deletions api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

## Getting Started

Install [golangci-lint](https://github.com/golangci/golangci-lint).

Install [swag](https://github.com/swaggo/swag).
Prerequisites:
- [golangci-lint](https://github.com/golangci/golangci-lint)
- [gci](https://github.com/daixiang0/gci)
- [gofumpt](https://github.com/mvdan/gofumpt)
- [swag](https://github.com/swaggo/swag)

Run for development:

Expand All @@ -24,20 +26,26 @@ Lint code:
golangci-lint run
```

Build Docker image:
Format code:

```shell
docker build -t voltaserve/api .
gci write -s standard -s default \
-s "prefix(github.com/kouprlabs)" \
-s "prefix(github.com/kouprlabs/voltaserve/api)" . && \
gofumpt -w . && \
gofmt -s -w . && \
goimports -w . && \
swag fmt
```

## Generate Documentation

Format swag comments:
Build Docker image:

```shell
swag fmt
docker build -t voltaserve/api .
```

## Generate Documentation

Generate `swagger.yml`:

```shell
Expand Down
25 changes: 16 additions & 9 deletions conversion/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Voltaserve Conversion

Install [golangci-lint](https://github.com/golangci/golangci-lint).

Install [swag](https://github.com/swaggo/swag).
Prerequisites:
- [golangci-lint](https://github.com/golangci/golangci-lint)
- [gci](https://github.com/daixiang0/gci)
- [gofumpt](https://github.com/mvdan/gofumpt)
- [swag](https://github.com/swaggo/swag)

Run for development:

Expand All @@ -22,20 +24,25 @@ Lint code:
golangci-lint run
```

Build Docker image:
Format code:

```shell
docker build -t voltaserve/conversion .
gci write -s standard -s default \
-s "prefix(github.com/kouprlabs)" \
-s "prefix(github.com/kouprlabs/voltaserve/conversion)" . && \
gofumpt -w . && \
gofmt -s -w . && \
goimports -w .
```

## Generate Documentation

Format swag comments:
Build Docker image:

```shell
swag fmt
docker build -t voltaserve/conversion .
```

## Generate Documentation

Generate `swagger.yml`:

```shell
Expand Down
26 changes: 17 additions & 9 deletions mosaic/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Voltaserve Mosaic

Install [golangci-lint](https://github.com/golangci/golangci-lint).

Install [swag](https://github.com/swaggo/swag).
Prerequisites:
- [golangci-lint](https://github.com/golangci/golangci-lint)
- [gci](https://github.com/daixiang0/gci)
- [gofumpt](https://github.com/mvdan/gofumpt)
- [swag](https://github.com/swaggo/swag)

Run for development:

Expand All @@ -22,20 +24,26 @@ Lint code:
golangci-lint run
```

Build Docker image:
Format code:

```shell
docker build -t voltaserve/mosaic .
gci write -s standard -s default \
-s "prefix(github.com/kouprlabs)" \
-s "prefix(github.com/kouprlabs/voltaserve/mosaic)" . && \
gofumpt -w . && \
gofmt -s -w . && \
goimports -w . && \
swag fmt
```

## Generate Documentation

Format swag comments:
Build Docker image:

```shell
swag fmt
docker build -t voltaserve/mosaic .
```

## Generate Documentation

Generate `swagger.yml`:

```shell
Expand Down
19 changes: 16 additions & 3 deletions webdav/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Voltaserve WebDAV

Install [golangci-lint](https://github.com/golangci/golangci-lint).

Install [swag](https://github.com/swaggo/swag).
Prerequisites:
- [golangci-lint](https://github.com/golangci/golangci-lint)
- [gci](https://github.com/daixiang0/gci)
- [gofumpt](https://github.com/mvdan/gofumpt)
- [swag](https://github.com/swaggo/swag)

Run for development:

Expand All @@ -22,6 +24,17 @@ Lint code:
golangci-lint run
```

Format code:

```shell
gci write -s standard -s default \
-s "prefix(github.com/kouprlabs)" \
-s "prefix(github.com/kouprlabs/voltaserve/webdav)" . && \
gofumpt -w . && \
gofmt -s -w . && \
goimports -w .
```

Build Docker image:

```shell
Expand Down

0 comments on commit d612d3b

Please sign in to comment.