mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-10-31 22:58:59 +01:00
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
This commit is contained in:
parent
53439e5c79
commit
96fb7506db
2 changed files with 52 additions and 18 deletions
64
.drone.yml
64
.drone.yml
|
@ -12,7 +12,8 @@ trigger:
|
||||||
- pull_request
|
- pull_request
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- docs/**
|
- "docs/**"
|
||||||
|
- "*.md"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: deps
|
- name: deps
|
||||||
|
@ -181,7 +182,7 @@ trigger:
|
||||||
- pull_request
|
- pull_request
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- docs/**
|
- "docs/**"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: deps
|
- name: deps
|
||||||
|
@ -266,6 +267,35 @@ steps:
|
||||||
- name: deps
|
- name: deps
|
||||||
path: /go
|
path: /go
|
||||||
|
|
||||||
|
---
|
||||||
|
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
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
|
@ -283,7 +313,7 @@ trigger:
|
||||||
- pull_request
|
- pull_request
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- docs/**
|
- "docs/**"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: deps
|
- name: deps
|
||||||
|
@ -444,7 +474,7 @@ trigger:
|
||||||
- pull_request
|
- pull_request
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- docs/**
|
- "docs/**"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: deps
|
- name: deps
|
||||||
|
@ -530,7 +560,7 @@ trigger:
|
||||||
- pull_request
|
- pull_request
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- docs/**
|
- "docs/**"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: deps
|
- name: deps
|
||||||
|
@ -616,7 +646,7 @@ trigger:
|
||||||
- pull_request
|
- pull_request
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- docs/**
|
- "docs/**"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: deps
|
- name: deps
|
||||||
|
@ -696,7 +726,7 @@ trigger:
|
||||||
- pull_request
|
- pull_request
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- docs/**
|
- "docs/**"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: deps
|
- name: deps
|
||||||
|
@ -867,7 +897,7 @@ trigger:
|
||||||
- push
|
- push
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- docs/**
|
- "docs/**"
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- testing-mysql
|
- testing-mysql
|
||||||
|
@ -1125,7 +1155,7 @@ trigger:
|
||||||
- pull_request
|
- pull_request
|
||||||
paths:
|
paths:
|
||||||
include:
|
include:
|
||||||
- docs/**
|
- "docs/**"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-docs
|
- name: build-docs
|
||||||
|
@ -1176,7 +1206,7 @@ trigger:
|
||||||
- cron
|
- cron
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- docs/**
|
- "docs/**"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: fetch-tags
|
- name: fetch-tags
|
||||||
|
@ -1253,7 +1283,7 @@ trigger:
|
||||||
- cron
|
- cron
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- docs/**
|
- "docs/**"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: fetch-tags
|
- name: fetch-tags
|
||||||
|
@ -1468,7 +1498,7 @@ trigger:
|
||||||
- pull_request
|
- pull_request
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- docs/**
|
- "docs/**"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: dryrun
|
- name: dryrun
|
||||||
|
@ -1515,7 +1545,7 @@ trigger:
|
||||||
- cron
|
- cron
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- docs/**
|
- "docs/**"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: fetch-tags
|
- name: fetch-tags
|
||||||
|
@ -1592,7 +1622,7 @@ trigger:
|
||||||
- cron
|
- cron
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- docs/**
|
- "docs/**"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: fetch-tags
|
- name: fetch-tags
|
||||||
|
@ -1667,7 +1697,7 @@ trigger:
|
||||||
- cron
|
- cron
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- docs/**
|
- "docs/**"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: fetch-tags
|
- name: fetch-tags
|
||||||
|
@ -1834,7 +1864,7 @@ trigger:
|
||||||
- cron
|
- cron
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- docs/**
|
- "docs/**"
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- docker-linux-amd64-release-version
|
- docker-linux-amd64-release-version
|
||||||
|
@ -1884,7 +1914,7 @@ trigger:
|
||||||
- cron
|
- cron
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- docs/**
|
- "docs/**"
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- docker-linux-amd64-release
|
- docker-linux-amd64-release
|
||||||
|
|
6
Makefile
6
Makefile
|
@ -196,6 +196,7 @@ help:
|
||||||
@echo " - lint lint everything"
|
@echo " - lint lint everything"
|
||||||
@echo " - lint-frontend lint frontend files"
|
@echo " - lint-frontend lint frontend files"
|
||||||
@echo " - lint-backend lint backend files"
|
@echo " - lint-backend lint backend files"
|
||||||
|
@echo " - lint-md lint markdown files"
|
||||||
@echo " - checks run various consistency checks"
|
@echo " - checks run various consistency checks"
|
||||||
@echo " - checks-frontend check frontend files"
|
@echo " - checks-frontend check frontend files"
|
||||||
@echo " - checks-backend check backend 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
|
lint: lint-frontend lint-backend
|
||||||
|
|
||||||
.PHONY: lint-frontend
|
.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 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 stylelint --color --max-warnings=0 web_src/css
|
||||||
npx spectral lint -q -F hint $(SWAGGER_SPEC)
|
npx spectral lint -q -F hint $(SWAGGER_SPEC)
|
||||||
|
|
||||||
|
.PHONY: lint-md
|
||||||
|
lint-md: node_modules
|
||||||
npx markdownlint docs *.md
|
npx markdownlint docs *.md
|
||||||
|
|
||||||
.PHONY: lint-backend
|
.PHONY: lint-backend
|
||||||
|
|
Loading…
Reference in a new issue