mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-01 01:53:40 +00: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
|
||||
paths:
|
||||
exclude:
|
||||
- docs/**
|
||||
- "docs/**"
|
||||
- "*.md"
|
||||
|
||||
volumes:
|
||||
- name: deps
|
||||
|
@ -181,7 +182,7 @@ trigger:
|
|||
- pull_request
|
||||
paths:
|
||||
exclude:
|
||||
- docs/**
|
||||
- "docs/**"
|
||||
|
||||
volumes:
|
||||
- name: deps
|
||||
|
@ -266,6 +267,35 @@ steps:
|
|||
- name: deps
|
||||
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
|
||||
type: docker
|
||||
|
@ -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
|
||||
|
|
6
Makefile
6
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
|
||||
|
|
Loading…
Reference in a new issue