aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-04-09 20:05:12 +0200
committerGitHub <noreply@github.com>2023-04-09 20:05:12 +0200
commit96fb7506db633135f1470dc0ed34b4b1e36e8ea0 (patch)
tree962e799a5af9d25ae922ce7f885e237af9b1f4b0
parent53439e5c7944b3dc2aa5974b7ea1659b0d6e61f1 (diff)
downloadgitea-96fb7506db633135f1470dc0ed34b4b1e36e8ea0.tar.gz
gitea-96fb7506db633135f1470dc0ed34b4b1e36e8ea0.zip
Introduce lint-md and compliance-docs pipeline (#24021)
- Add new Make target `lint-md` - Add new Drone pipeline `compliance-docs` - Add `*.md` to docs exclusion/inclusion - Consistently quote `path.include` and `path.exclude` statements in YAML
-rw-r--r--.drone.yml64
-rw-r--r--Makefile6
2 files changed, 52 insertions, 18 deletions
diff --git a/.drone.yml b/.drone.yml
index 225192c5d9..5f1167d286 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -12,7 +12,8 @@ trigger:
- pull_request
paths:
exclude:
- - docs/**
+ - "docs/**"
+ - "*.md"
volumes:
- name: deps
@@ -181,7 +182,7 @@ trigger:
- pull_request
paths:
exclude:
- - docs/**
+ - "docs/**"
volumes:
- name: deps
@@ -269,6 +270,35 @@ steps:
---
kind: pipeline
type: docker
+name: compliance-docs
+
+platform:
+ os: linux
+ arch: amd64
+
+trigger:
+ event:
+ - pull_request
+ paths:
+ include:
+ - "docs/**"
+ - "*.md"
+
+steps:
+ - name: deps-frontend
+ image: node:18
+ pull: always
+ commands:
+ - make deps-frontend
+
+ - name: lint-md
+ image: node:18
+ commands:
+ - make lint-md
+
+---
+kind: pipeline
+type: docker
name: testing-mysql
platform:
@@ -283,7 +313,7 @@ trigger:
- pull_request
paths:
exclude:
- - docs/**
+ - "docs/**"
volumes:
- name: deps
@@ -444,7 +474,7 @@ trigger:
- pull_request
paths:
exclude:
- - docs/**
+ - "docs/**"
volumes:
- name: deps
@@ -530,7 +560,7 @@ trigger:
- pull_request
paths:
exclude:
- - docs/**
+ - "docs/**"
volumes:
- name: deps
@@ -616,7 +646,7 @@ trigger:
- pull_request
paths:
exclude:
- - docs/**
+ - "docs/**"
volumes:
- name: deps
@@ -696,7 +726,7 @@ trigger:
- pull_request
paths:
exclude:
- - docs/**
+ - "docs/**"
volumes:
- name: deps
@@ -867,7 +897,7 @@ trigger:
- push
paths:
exclude:
- - docs/**
+ - "docs/**"
depends_on:
- testing-mysql
@@ -1125,7 +1155,7 @@ trigger:
- pull_request
paths:
include:
- - docs/**
+ - "docs/**"
steps:
- name: build-docs
@@ -1176,7 +1206,7 @@ trigger:
- cron
paths:
exclude:
- - docs/**
+ - "docs/**"
steps:
- name: fetch-tags
@@ -1253,7 +1283,7 @@ trigger:
- cron
paths:
exclude:
- - docs/**
+ - "docs/**"
steps:
- name: fetch-tags
@@ -1468,7 +1498,7 @@ trigger:
- pull_request
paths:
exclude:
- - docs/**
+ - "docs/**"
steps:
- name: dryrun
@@ -1515,7 +1545,7 @@ trigger:
- cron
paths:
exclude:
- - docs/**
+ - "docs/**"
steps:
- name: fetch-tags
@@ -1592,7 +1622,7 @@ trigger:
- cron
paths:
exclude:
- - docs/**
+ - "docs/**"
steps:
- name: fetch-tags
@@ -1667,7 +1697,7 @@ trigger:
- cron
paths:
exclude:
- - docs/**
+ - "docs/**"
steps:
- name: fetch-tags
@@ -1834,7 +1864,7 @@ trigger:
- cron
paths:
exclude:
- - docs/**
+ - "docs/**"
depends_on:
- docker-linux-amd64-release-version
@@ -1884,7 +1914,7 @@ trigger:
- cron
paths:
exclude:
- - docs/**
+ - "docs/**"
depends_on:
- docker-linux-amd64-release
diff --git a/Makefile b/Makefile
index 56ac44eb11..eb48766194 100644
--- a/Makefile
+++ b/Makefile
@@ -196,6 +196,7 @@ help:
@echo " - lint lint everything"
@echo " - lint-frontend lint frontend files"
@echo " - lint-backend lint backend files"
+ @echo " - lint-md lint markdown files"
@echo " - checks run various consistency checks"
@echo " - checks-frontend check frontend files"
@echo " - checks-backend check backend files"
@@ -341,10 +342,13 @@ checks-backend: tidy-check swagger-check fmt-check misspell-check swagger-valida
lint: lint-frontend lint-backend
.PHONY: lint-frontend
-lint-frontend: node_modules
+lint-frontend: node_modules lint-md
npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js docs/assets/js tests/e2e
npx stylelint --color --max-warnings=0 web_src/css
npx spectral lint -q -F hint $(SWAGGER_SPEC)
+
+.PHONY: lint-md
+lint-md: node_modules
npx markdownlint docs *.md
.PHONY: lint-backend