Skip to content

Commit

Permalink
💥 Use cppjieba
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Nov 21, 2024
1 parent 9cf61bd commit 6865e26
Show file tree
Hide file tree
Showing 23 changed files with 1,242 additions and 89 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
"on":
push:
paths-ignore:
- "**.md"
- doc/*
pull_request:
paths-ignore:
- "**.md"
- doc/*
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: nvim-neorocks/luarocks-tag-release@v5
env:
LUAROCKS_API_KEY: ${{secrets.LUAROCKS_API_KEY}}
if: "! startsWith(github.ref, 'refs/tags/')"
with:
extra_luarocks_args: |
--force
version: scm
template: template.rockspec
- uses: nvim-neorocks/luarocks-tag-release@v5
env:
LUAROCKS_API_KEY: ${{secrets.LUAROCKS_API_KEY}}
if: startsWith(github.ref, 'refs/tags/')
with:
extra_luarocks_args: |
--force
template: template.rockspec
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/cppjieba/
/lua/jieba/dict/

*.out
compile_commands.json

/output/
build/
.cache/
.xmake/
4 changes: 4 additions & 0 deletions .gitlint
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env -S gitlint -C
[ignore-by-title]
regex=.*
ignore=body-is-missing
86 changes: 86 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: fix-byte-order-marker
- id: check-case-conflict
- id: check-shebang-scripts-are-executable
- id: check-merge-conflict
- id: trailing-whitespace
- id: mixed-line-ending
- id: end-of-file-fixer
- id: detect-private-key
- id: check-symlinks
- id: check-ast
- id: debug-statements
- id: requirements-txt-fixer
- id: check-xml
- id: check-yaml
- id: check-toml
- id: check-json
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: remove-crlf
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies:
- tomli
- repo: https://github.com/jorisroovers/gitlint
rev: v0.19.1
hooks:
- id: gitlint
args:
- --msg-filename
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 3.0.3
hooks:
- id: editorconfig-checker
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: check-mailmap
- repo: https://github.com/rhysd/actionlint
rev: v1.7.4
hooks:
- id: actionlint
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.18
hooks:
- id: mdformat
additional_dependencies:
- mdformat-pyproject
- mdformat-gfm
- mdformat-myst
- mdformat-toc
- mdformat-deflist
- mdformat-beautysh
- mdformat-ruff
- mdformat-config
- mdformat-web
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.14.0
hooks:
- id: markdownlint-cli2
additional_dependencies:
- markdown-it-texmath
- repo: https://github.com/lunarmodules/luacheck
rev: v1.2.0
hooks:
- id: luacheck
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.3
hooks:
- id: clang-format
- repo: https://github.com/nix-community/nixpkgs-fmt
rev: v1.3.0
hooks:
- id: nixpkgs-fmt
8 changes: 8 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env -S yamllint -c
---
extends: default

rules:
comments:
# https://github.com/prettier/prettier/issues/6780
min-spaces-from-content: 1
Loading

0 comments on commit 6865e26

Please sign in to comment.