-
Notifications
You must be signed in to change notification settings - Fork 157
38 lines (35 loc) · 1.29 KB
/
detect_forbidden_characters.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: detect forbidden characters
# 本リポジトリでは、以下に挙げる文字の使用を禁止している:
# U+00AD SOFT HYPHEN (ソフトハイフン)
# U+200B ZERO WIDTH SPACE (ゼロ幅スペース)
#
# 経緯は以下を参照:
# #735 SOFT HYPHENを削除する?
# https://github.com/cpprefjp/site/issues/735
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
env:
RIPGREP_VERSION: 14.1.0
BIN_DIR: ${{ github.workspace }}/bin
REPO_DIR: repo
cache-version: v1
steps:
- id: cache-ripgrep
uses: actions/cache@v3
with:
path: ${{ env.BIN_DIR }}
key: ${{ env.cache-version }}-ripgrep-${{ env.RIPGREP_VERSION }}
- name: install ripgrep
if: steps.cache-ripgrep.outputs.cache-hit != 'true'
run: |
curl -fsSLO https://github.com/BurntSushi/ripgrep/releases/download/$RIPGREP_VERSION/ripgrep-$RIPGREP_VERSION-x86_64-unknown-linux-musl.tar.gz
mkdir -p $BIN_DIR
tar xvf ripgrep-$RIPGREP_VERSION-x86_64-unknown-linux-musl.tar.gz --strip=1 --no-anchor -C $BIN_DIR rg
working-directory: ${{ runner.temp }}
- uses: actions/checkout@v4
with:
path: ${{ env.REPO_DIR }}
- name: check
run: "! $BIN_DIR/rg -t md --vimgrep '[\u00ad\u200b]' $REPO_DIR"