Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3: Add support for consistent documentation using markdownlint #3064

Merged
merged 13 commits into from
Jul 11, 2024
4 changes: 2 additions & 2 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ Community leaders will follow these Community Impact Guidelines in determining t
## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
available at <https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.

Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
<https://www.contributor-covenant.org/faq>. Translations are available at <https://www.contributor-covenant.org/translations>.
4 changes: 3 additions & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ Before making any changes to this repository, we kindly request you to initiate
Please note: we have a [code of conduct](https://github.com/gofiber/fiber/blob/master/.github/CODE_OF_CONDUCT.md), please follow it in all your interactions with the `Fiber` project.

## Pull Requests or Commits

Titles always we must use prefix according to below:

> 🔥 Feature, ♻️ Refactor, 🩹 Fix, 🚨 Test, 📚 Doc, 🎨 Style

- 🔥 Feature: Add flow to add person
- ♻️ Refactor: Rename file X to Y
- 🩹 Fix: Improve flow
Expand All @@ -17,7 +19,7 @@ Titles always we must use prefix according to below:

All pull requests that contain a feature or fix are mandatory to have unit tests. Your PR is only to be merged if you respect this flow.

# 👍 Contribute
## 👍 Contribute

If you want to say **thank you** and/or support the active development of `Fiber`:

Expand Down
56 changes: 28 additions & 28 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p align="center">
<h1 align="center">
<a href="https://gofiber.io">
<picture>
<source height="125" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/gofiber/docs/master/static/img/logo-dark.svg">
Expand All @@ -12,7 +12,7 @@
<a href="https://goreportcard.com/report/github.com/gofiber/fiber/v3">
<img src="https://img.shields.io/badge/%F0%9F%93%9D%20goreport-A%2B-75C46B?style=flat-square">
</a>
<a href="https://codecov.io/gh/gofiber/fiber" >
<a href="https://codecov.io/gh/gofiber/fiber" >
<img alt="Codecov" src="https://img.shields.io/codecov/c/github/gofiber/fiber?token=3Cr92CwaPQ&style=flat-square&logo=codecov&label=codecov">
</a>
<a href="https://github.com/gofiber/fiber/actions?query=workflow%3ATest">
Expand All @@ -24,7 +24,7 @@
<a href="https://gofiber.io/discord">
<img src="https://img.shields.io/discord/704680098577514527?style=flat-square&label=%F0%9F%92%AC%20discord&color=00ACD7">
</a>
</p>
</h1>
<p align="center">
<em><b>Fiber</b> is an <a href="https://github.com/expressjs/express">Express</a> inspired <b>web framework</b> built on top of <a href="https://github.com/valyala/fasthttp">Fasthttp</a>, the <b>fastest</b> HTTP engine for <a href="https://go.dev/doc/">Go</a>. Designed to <b>ease</b> things up for <b>fast</b> development with <a href="https://docs.gofiber.io/#zero-allocation"><b>zero memory allocation</b></a> and <b>performance</b> in mind.</em>
</p>
Expand Down Expand Up @@ -57,7 +57,7 @@ This command fetches the Fiber package and adds it to your project's dependencie

## ⚡️ Quickstart

Getting started with Fiber is easy. Here's a basic example to create a simple web server that responds with "Hello, World 👋!" on the root path. This example demonstrates initializing a new Fiber app, setting up a route, and starting the server.
Getting started with Fiber is easy. Here's a basic example to create a simple web server that responds with "Hello, World 👋!" on the root path. This example demonstrates initializing a new Fiber app, setting up a route, and starting the server.

```go
package main
Expand Down Expand Up @@ -100,19 +100,19 @@ These tests are performed by [TechEmpower](https://www.techempower.com/benchmark

## 🎯 Features

- Robust [Routing](https://docs.gofiber.io/guide/routing)
- Serve [Static Files](https://docs.gofiber.io/api/app#static)
- Extreme [Performance](https://docs.gofiber.io/extra/benchmarks)
- [Low Memory](https://docs.gofiber.io/extra/benchmarks) footprint
- [API Endpoints](https://docs.gofiber.io/api/ctx)
- [Middleware](https://docs.gofiber.io/category/-middleware) & [Next](https://docs.gofiber.io/api/ctx#next) support
- [Rapid](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) server-side programming
- [Template Engines](https://github.com/gofiber/template)
- [WebSocket Support](https://github.com/gofiber/contrib/tree/main/websocket)
- [Socket.io Support](https://github.com/gofiber/contrib/tree/main/socketio)
- [Server-Sent Events](https://github.com/gofiber/recipes/tree/master/sse)
- [Rate Limiter](https://docs.gofiber.io/api/middleware/limiter)
- And much more, [explore Fiber](https://docs.gofiber.io/)
- Robust [Routing](https://docs.gofiber.io/guide/routing)
- Serve [Static Files](https://docs.gofiber.io/api/app#static)
- Extreme [Performance](https://docs.gofiber.io/extra/benchmarks)
- [Low Memory](https://docs.gofiber.io/extra/benchmarks) footprint
- [API Endpoints](https://docs.gofiber.io/api/ctx)
- [Middleware](https://docs.gofiber.io/category/-middleware) & [Next](https://docs.gofiber.io/api/ctx#next) support
- [Rapid](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) server-side programming
- [Template Engines](https://github.com/gofiber/template)
- [WebSocket Support](https://github.com/gofiber/contrib/tree/main/websocket)
- [Socket.io Support](https://github.com/gofiber/contrib/tree/main/socketio)
- [Server-Sent Events](https://github.com/gofiber/recipes/tree/master/sse)
- [Rate Limiter](https://docs.gofiber.io/api/middleware/limiter)
- And much more, [explore Fiber](https://docs.gofiber.io/)

## 💡 Philosophy

Expand All @@ -124,14 +124,14 @@ We **listen** to our users in [issues](https://github.com/gofiber/fiber/issues),

## ⚠️ Limitations

- Due to Fiber's usage of unsafe, the library may not always be compatible with the latest Go version. Fiber v3 has been tested with Go versions 1.21 and 1.22.
- Fiber is not compatible with net/http interfaces. This means you will not be able to use projects like gqlgen, go-swagger, or any others which are part of the net/http ecosystem.
- Due to Fiber's usage of unsafe, the library may not always be compatible with the latest Go version. Fiber v3 has been tested with Go versions 1.21 and 1.22.
- Fiber is not compatible with net/http interfaces. This means you will not be able to use projects like gqlgen, go-swagger, or any others which are part of the net/http ecosystem.

## 👀 Examples

Listed below are some of the common examples. If you want to see more code examples, please visit our [Recipes repository](https://github.com/gofiber/recipes) or visit our hosted [API documentation](https://docs.gofiber.io).

#### 📖 [**Basic Routing**](https://docs.gofiber.io/#basic-routing)
### 📖 [**Basic Routing**](https://docs.gofiber.io/#basic-routing)

```go
func main() {
Expand Down Expand Up @@ -634,14 +634,14 @@ If you want to say **Thank You** and/or support the active development of `Fiber

To ensure your contributions are ready for a Pull Request, please use the following `Makefile` commands. These tools help maintain code quality, consistency.

* **make help**: Display available commands.
* **make audit**: Conduct quality checks.
* **make benchmark**: Benchmark code performance.
* **make coverage**: Generate test coverage report.
* **make format**: Automatically format code.
* **make lint**: Run lint checks.
* **make test**: Execute all tests.
* **make tidy**: Tidy dependencies.
- **make help**: Display available commands.
- **make audit**: Conduct quality checks.
- **make benchmark**: Benchmark code performance.
- **make coverage**: Generate test coverage report.
- **make format**: Automatically format code.
- **make lint**: Run lint checks.
- **make test**: Execute all tests.
- **make tidy**: Tidy dependencies.

Run these commands to ensure your code adheres to project standards and best practices.

Expand Down
6 changes: 5 additions & 1 deletion .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
4. [Incident Response Process](#process)

<a name="versions"></a>

## Supported Versions

The table below shows the supported versions for Fiber which include security updates.
Expand All @@ -16,6 +17,7 @@ The table below shows the supported versions for Fiber which include security up
| < 1.12.6 | :x: |

<a name="reporting"></a>

## Reporting security problems to Fiber

**DO NOT CREATE AN ISSUE** to report a security problem. Instead, please
Expand All @@ -24,6 +26,7 @@ send us an e-mail at `[email protected]` or join our discord server via
to Fenny or any of the maintainers.

<a name="contact"></a>

## Security Point of Contact

The security point of contact is [Fenny](https://github.com/Fenny). Fenny responds
Expand All @@ -35,6 +38,7 @@ of contact are any of the [@maintainers](https://github.com/orgs/gofiber/teams/m
The maintainers are the only other persons with administrative access to Fiber's source code.

<a name="process"></a>

## Incident Response Process

In case an incident is discovered or reported, we will follow the following
Expand Down Expand Up @@ -73,4 +77,4 @@ for all of it's members.
We learn about critical software updates and security threats from these sources

1. GitHub Security Alerts
2. GitHub: https://status.github.com/ & [@githubstatus](https://twitter.com/githubstatus)
2. GitHub: <https://status.github.com/> & [@githubstatus](https://twitter.com/githubstatus)
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Description
# Description

Please provide a clear and concise description of the changes you've made and the problem they address. Include the purpose of the change, any relevant issues it solves, and the benefits it brings to the project. If this change introduces new features or adjustments, highlight them here.

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/auto-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
types: [opened, edited, milestoned]
pull_request_target:
types: [opened]

permissions:
contents: read
issues: write
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ on:
branches:
- master
- main
paths:
- "**"
- "!docs/**"
- "!**.md"
paths-ignore:
- "**/*.md"
pull_request:
paths:
- "**"
- "!docs/**"
- "!**.md"
paths-ignore:
- "**/*.md"

name: Benchmark
jobs:
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@ on:
branches:
- master
- main
paths:
- "**"
- "!docs/**"
- "!**.md"
paths-ignore:
- "**/*.md"
pull_request:
paths:
- "**"
- "!docs/**"
- "!**.md"
paths-ignore:
- "**/*.md"
schedule:
- cron: "0 3 * * 6"

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ on:
branches:
- master
- main
paths-ignore:
- "**/*.md"
pull_request:
paths-ignore:
- "**/*.md"

permissions:
# Required: allow read access to the content for analysis.
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/markdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: markdownlint

on:
push:
branches:
- master
- main
paths:
- "**/*.md"
pull_request:
paths:
- "**/*.md"

jobs:
markdownlint:
runs-on: ubuntu-latest
steps:
- name: Fetch Repository
uses: actions/checkout@v4

- name: Run markdownlint-cli2
uses: DavidAnson/markdownlint-cli2-action@v16
with:
globs: |
**/*.md
12 changes: 4 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@ on:
branches:
- master
- main
paths:
- "**"
- "!docs/**"
- "!**.md"
paths-ignore:
- "**/*.md"
pull_request:
paths:
- "**"
- "!docs/**"
- "!**.md"
paths-ignore:
- "**/*.md"

jobs:
unit:
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/vulncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@ on:
branches:
- master
- main
paths:
- "**"
- "!docs/**"
- "!**.md"
paths-ignore:
- "**/*.md"
pull_request:
paths:
- "**"
- "!docs/**"
- "!**.md"
paths-ignore:
- "**/*.md"

jobs:
govulncheck-check:
Expand Down
Loading
Loading