From 6b4c6a982f70d26afe544f90e8dc24401f4f63a7 Mon Sep 17 00:00:00 2001 From: Yago Riveiro Date: Fri, 5 Jan 2024 23:24:01 +0000 Subject: [PATCH 1/2] feat: add markdown lint GH action Signed-off-by: Yago Riveiro --- .../markdownlint-problem-matcher.json | 17 ++++++++++ .github/workflows/markdownlint.yaml | 34 +++++++++++++++++++ .markdownlint-cli2.jsonc | 9 +++++ 3 files changed, 60 insertions(+) create mode 100644 .github/workflows/markdownlint-problem-matcher.json create mode 100644 .github/workflows/markdownlint.yaml create mode 100644 .markdownlint-cli2.jsonc diff --git a/.github/workflows/markdownlint-problem-matcher.json b/.github/workflows/markdownlint-problem-matcher.json new file mode 100644 index 0000000..c37cf8b --- /dev/null +++ b/.github/workflows/markdownlint-problem-matcher.json @@ -0,0 +1,17 @@ +{ + "problemMatcher": [ + { + "owner": "markdownlint", + "pattern": [ + { + "regexp": "^([^:]*):(\\d+):?(\\d+)?\\s([\\w-\\/]*)\\s(.*)$", + "file": 1, + "line": 2, + "column": 3, + "code": 4, + "message": 5 + } + ] + } + ] +} diff --git a/.github/workflows/markdownlint.yaml b/.github/workflows/markdownlint.yaml new file mode 100644 index 0000000..5b2bac8 --- /dev/null +++ b/.github/workflows/markdownlint.yaml @@ -0,0 +1,34 @@ +name: Markdownlint +on: + push: + branches: + - main + paths: + - "**/*.md" + - "**/*.mdx" + - ".markdownlint-cli2.jsonc" + - ".github/workflows/markdownlint.yml" + - ".github/workflows/markdownlint-problem-matcher.json" + pull_request: + paths: + - "**/*.md" + - "**/*.mdx" + - ".markdownlint-cli2.jsonc" + - ".github/workflows/markdownlint.yml" + - ".github/workflows/markdownlint-problem-matcher.json" +jobs: + lint: + runs-on: ubuntu-latest + permissions: + statuses: write + steps: + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Run Markdownlint + run: | + echo "::add-matcher::.github/workflows/markdownlint-problem-matcher.json" + npm i -g markdownlint-cli2 + markdownlint-cli2 "**/*.{md,mdx,markdown}" diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc new file mode 100644 index 0000000..32893c9 --- /dev/null +++ b/.markdownlint-cli2.jsonc @@ -0,0 +1,9 @@ +{ + "config": { + "default": true, + "MD024": false, + "MD025": false, + "MD041": false + }, + "ignores": [".github/"] +} From 0c921dd5e606c56d4cc7c39eefbf6321ff20759a Mon Sep 17 00:00:00 2001 From: Yago Riveiro Date: Fri, 5 Jan 2024 23:28:44 +0000 Subject: [PATCH 2/2] fix: markdown lint issues Signed-off-by: Yago Riveiro --- README.md | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index ba9cae9..128b7a8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # dap-go.nvim -Golang with Delve over Debug Adapter Protocol for [Neovim](https://neovim.io/) (>= 0.5) +Golang with Delve over Debug Adapter Protocol for [Neovim](https://neovim.io/) +(>= 0.5) # What is DAP Go @@ -15,27 +16,30 @@ to configurate Go with Delve debugger. - [Installation](#installation) - [Contributing](#contributing) - [Changelog](https://github.com/yriveiro/dap-go.nvim/blob/master/doc/dap_go_changelog.md) -- [Acknowledgement](#Acknowledgement) +- [Acknowledgement](#acknowledgement) - [License](#license) ## Features -* Load `dap` configurations from a file. +- Load `dap` configurations from a file. ## Getting Started -This section should guide you on how to add the extention to `nvim-dap`. +This section should guide you on how to add the extension to `nvim-dap`. ### Dependencies -* [Neovim (v.5.1)](https://github.com/neovim/neovim/releases/tag/v0.5.1) or higher. -* [plenary.nvim](https://github.com/nvim-lua/plenary.nvim) for all the stuff I don't want to write twice. -* [Delve](https://github.com/go-delve/delve) +- [Neovim (v.5.1)](https://github.com/neovim/neovim/releases/tag/v0.5.1) or higher. +- [plenary.nvim](https://github.com/nvim-lua/plenary.nvim) for all the stuff I + don't want to write twice. +- [Delve](https://github.com/go-delve/delve) ### Suggested Dependencies -* [telescope-dap](https://github.com/nvim-telescope/telescope-dap.nvim) to browse the `dap` configurations. -* [nvim-dap-ui](https://github.com/rcarriga/nvim-dap-ui) for more user friendly DAP user interface. +- [telescope-dap](https://github.com/nvim-telescope/telescope-dap.nvim) to browse + the `dap` configurations. +- [nvim-dap-ui](https://github.com/rcarriga/nvim-dap-ui) for more user friendly + DAP user interface. ## Installation @@ -84,9 +88,11 @@ require('dap-go').setup({ } }) ``` - -An example of the `dap-go.json` file. This file can be used for custom configurations. -The default path to search for is the current directory or git (if the current project is using git) root. + +An example of the `dap-go.json` file. This file can be used for custom configurations. +The default path to search for is the current directory or git (if the current project +is using git) root. + ```json { "Custom config": { @@ -106,14 +112,16 @@ The default path to search for is the current directory or git (if the current p } } ``` + ## Contributing All contributions are welcome! Just open a pull request. Please read CONTRIBUTING.md ## Acknowledgement -* [nvim-dap-go](https://github.com/leoluz/nvim-dap-go) +- [nvim-dap-go](https://github.com/leoluz/nvim-dap-go) ## License -Licensed under the MIT License. Check the [LICENSE](https://github.com/yriveiro/dap-go.nvim/blob/main/LICENSE) file for details. +Licensed under the MIT License. Check the [LICENSE](https://github.com/yriveiro/dap-go.nvim/blob/main/LICENSE) +file for details.