generated from libre-knowledge/subject-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d969e4a
Showing
14 changed files
with
618 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# EditorConfig is awesome | ||
# http://EditorConfig.org | ||
# | ||
# This file is based on The Common EditorConfig Template project | ||
# https://github.com/the-common/editorconfig-template | ||
# | ||
# Copyright 2021 林博仁(Buo-ren, Lin) <[email protected]> | ||
# SPDX-License-Identifier: WTFPL | ||
|
||
# This is the top-most EditorConfig file | ||
root = true | ||
|
||
# Common settings | ||
[*] | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 4 | ||
charset = utf-8 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
# Git configuration files uses tabs as indentation units | ||
[.git*] | ||
indent_style = tab | ||
|
||
# Avoid git patch fail to apply due to stripped unmodified lines that contains only spaces | ||
[/.git/**] | ||
trim_trailing_whitespace = false | ||
|
||
# Makefiles for *Make | ||
[{Makefile,*.mk}] | ||
indent_style = tab | ||
|
||
# Markdown documents | ||
[*.{md,mkd,mkdn,markdown}] | ||
# Trailing whitespace means manual linebreaks | ||
trim_trailing_whitespace = false | ||
|
||
# Don't check indentation size as it can't handle intentional indentation | ||
# in list item after hardbreaks to align with the node markers, use | ||
# Markdownlint to check instead | ||
indent_size = unset | ||
|
||
# Vagrant configuration file | ||
[Vagrantfile] | ||
indent_size = 2 | ||
|
||
# yamllint configuration files | ||
[.yamllint] | ||
indent_size = 2 | ||
|
||
# YAML documents | ||
[*.{yml,yaml}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# workflows | ||
|
||
放置 GitHub Actions 的工作流程(workflow)定義檔 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# 用來檢查專案中的潛在問題的 GitHub Actions 工作流程(workflow)定義檔 | ||
# | ||
# 編輯參考: | ||
# | ||
# * Workflow syntax for GitHub Actions - GitHub Docs | ||
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions | ||
# | ||
# Copyright 2021 林博仁(Buo-ren, Lin) <[email protected]> | ||
# SPDX-License-Identifier: CC-BY-SA-4.0 | ||
name: 檢查專案中的潛在問題 | ||
on: | ||
- push | ||
jobs: | ||
check-using-precommit: | ||
name: 使用 pre-commit 檢查專案中的潛在問題 | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: 自版控庫取出內容 | ||
uses: actions/checkout@v2 | ||
|
||
- name: 安裝 pre-commit | ||
run: pip3 install pre-commit | ||
|
||
- name: 使用 pre-commit 檢查專案中的所有檔案 | ||
run: pre-commit run --all-files --color always | ||
|
||
- name: 傳送持續整合結果告警到 Telegram 頻道 | ||
uses: yanzay/[email protected] | ||
if: always() | ||
with: | ||
chat: '@libre_knowledge_ci' | ||
token: ${{ secrets.telegram_bot_api_token_ci }} | ||
status: ${{ job.status }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Git submodule definition file | ||
# | ||
# Reference: | ||
# | ||
# * Git - gitmodules Documentation | ||
# https://git-scm.com/docs/gitmodules | ||
# | ||
# Copyright 2021 林博仁(Buo-ren, Lin) <[email protected]> | ||
# SPDX-License-Identifier: CC-BY-SA-4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Markdownlint(Node.js variant) configuration file | ||
# https://github.com/igorshubovych/markdownlint-cli#configuration | ||
# | ||
# This file is based on The Common Markdownlint(Node.js variant) Configuration Templates project | ||
# https://github.com/Lin-Buo-Ren/common-markdownlint-nodejs-config-templates | ||
# | ||
# Copyright 2021 林博仁(Buo-ren, Lin) <[email protected]> | ||
# SPDX-License-Identifier: CC-BY-SA-4.0 | ||
|
||
# Inherit Markdownlint rules | ||
default: True | ||
|
||
# Only allow consistent un-ordered list bullet style(allow alternations in sub-levels) | ||
MD004: | ||
style: sublist | ||
|
||
# Only allow 4 spaces as indentation of lists | ||
MD007: | ||
indent: 4 | ||
|
||
# Only allow 2 spaces as linebreak sequence | ||
MD009: | ||
br_spaces: 2 | ||
|
||
# Disable line length limitation(not suitable with CJK context) | ||
MD013: False | ||
|
||
# Allow missing padding blank line between the heading markup and the context | ||
MD022: False | ||
|
||
# Allow duplicated non-sibling heading text | ||
MD024: | ||
siblings_only: True | ||
|
||
# Allow missing padding blank line between a list and its context | ||
MD032: False | ||
|
||
# Allow using raw HTML markups as workarounds of deficiencies of Markdown | ||
MD033: False | ||
|
||
# 佔位字是要被替換掉的,為此規則之特例 | ||
MD036: false | ||
|
||
# Allow using YAML front matter, while not require the definition of the | ||
# `title` property | ||
MD041: | ||
front_matter_title: '.*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Pre-commit framework Configuration | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
# | ||
# This file is based on The Common Pre-commit Framework Configuration Template | ||
# https://github.com/Lin-Buo-Ren/common-precommit-config-template | ||
# | ||
# Copyright 2021 林博仁(Buo-ren, Lin) <[email protected]> | ||
# SPDX-License-Identifier: CC-BY-SA-4.0 | ||
|
||
repos: | ||
# Some out-of-the-box hooks for pre-commit | ||
# https://github.com/pre-commit/pre-commit-hooks | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.3.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-executables-have-shebangs | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-vcs-permalinks | ||
- id: check-yaml | ||
- id: detect-aws-credentials | ||
args: | ||
- --allow-missing-credentials | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: fix-byte-order-marker | ||
- id: mixed-line-ending | ||
- id: trailing-whitespace | ||
args: | ||
- --markdown-linebreak-ext=md | ||
|
||
# Check Markdown documents with Markdownlint(Node.js variant) | ||
# https://github.com/DavidAnson/markdownlint | ||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.23.2 | ||
hooks: | ||
- id: markdownlint | ||
|
||
# Check REUSE compliance | ||
# https://reuse.software/ | ||
- repo: https://github.com/fsfe/reuse-tool | ||
rev: v0.12.1 | ||
hooks: | ||
- id: reuse | ||
|
||
# Check YAML files | ||
# https://github.com/adrienverge/yamllint | ||
- repo: https://github.com/adrienverge/yamllint | ||
rev: v1.26.1 | ||
hooks: | ||
- id: yamllint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | ||
Upstream-Name: 《自由知識協作平台》主題範本 | ||
Upstream-Contact: Issues · libre-knowledge/subject-template <https://github.com/libre-knowledge/subject-template/issues> | ||
Source: https://github.com/libre-knowledge/subject-template | ||
|
||
Files: | ||
*README.md | ||
*/README.md | ||
_config.yml | ||
Copyright: 2022 自由知識協作平台貢獻者 <https://github.com/libre-knowledge/libre-knowledge/issues> | ||
License: CC-BY-SA-4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
%YAML 1.2 | ||
--- | ||
# Configuration File of yamllint | ||
# https://yamllint.readthedocs.io | ||
# | ||
# This file is in YAML Ain’t Markup Language (YAML™) | ||
# http://yaml.org/ | ||
# | ||
# This file is based on the `default` pre-defined configuration from yamllint with documentation copied from its documentation | ||
# https://yamllint.readthedocs.io/en/stable/configuration.html#default-configuration | ||
# | ||
# This file is based on The Unofficial yamllint Configuration Templates | ||
# https://github.com/Lin-Buo-Ren/yamllint-configuration-templates | ||
# | ||
# Copyright 2021 林博仁(Buo-ren, Lin) <[email protected]> | ||
# SPDX-License-Identifier: CC-BY-SA-4.0 | ||
rules: | ||
# Use this rule to control the number of spaces inside braces (`{` and `}`). | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.braces | ||
braces: | ||
min-spaces-inside: 0 | ||
max-spaces-inside: 0 | ||
min-spaces-inside-empty: -1 | ||
max-spaces-inside-empty: -1 | ||
|
||
# Use this rule to control the number of spaces inside brackets (`[` and `]`). | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.brackets | ||
brackets: | ||
min-spaces-inside: 0 | ||
max-spaces-inside: 0 | ||
min-spaces-inside-empty: -1 | ||
max-spaces-inside-empty: -1 | ||
|
||
# Use this rule to control the number of spaces before and after colons (`:`). | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.colons | ||
colons: | ||
max-spaces-before: 0 | ||
max-spaces-after: 1 | ||
|
||
# Use this rule to control the number of spaces before and after commas (`,`). | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.commas | ||
commas: | ||
max-spaces-before: 0 | ||
min-spaces-after: 1 | ||
max-spaces-after: 1 | ||
|
||
# Use this rule to control the position and formatting of comments. | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.comments | ||
comments: | ||
level: warning | ||
# PATCHED: Comments without separate space are disabled content | ||
require-starting-space: false | ||
# PATCHED: We're good with 1 | ||
min-spaces-from-content: 1 | ||
|
||
# Use this rule to force comments to be indented like content. | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.comments_indentation | ||
# PATCHED: False positives, disabled | ||
comments-indentation: disable | ||
#level: warning | ||
|
||
# Use this rule to require or forbid the use of document end marker (`...`). | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.document_end | ||
document-end: disable | ||
|
||
# Use this rule to require or forbid the use of document start marker (`---`). | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.document_start | ||
# PATCHED: Some config allows, while some config rejects document start markers | ||
document-start: disable | ||
#level: warning | ||
#present: true | ||
|
||
# Use this rule to set a maximal number of allowed consecutive blank lines. | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.empty_lines | ||
empty-lines: | ||
max: 2 | ||
max-start: 0 | ||
max-end: 0 | ||
|
||
# Use this rule to prevent nodes with empty content, that implicitly result in null values. | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.empty_values | ||
empty-values: | ||
forbid-in-block-mappings: false | ||
forbid-in-flow-mappings: false | ||
|
||
# Use this rule to control the number of spaces after hyphens (`-`). | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.hyphens | ||
hyphens: | ||
max-spaces-after: 1 | ||
|
||
# Use this rule to control the indentation. | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.indentation | ||
indentation: | ||
spaces: consistent | ||
indent-sequences: true | ||
check-multi-line-strings: false | ||
|
||
# Use this rule to prevent multiple entries with the same key in mappings. | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.key_duplicates | ||
key-duplicates: enable | ||
|
||
# Use this rule to enforce alphabetical ordering of keys in mappings. The sorting order uses the Unicode code point number. As a result, the ordering is case-sensitive and not accent-friendly (see examples below). | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.key_ordering | ||
key-ordering: disable | ||
|
||
# Use this rule to set a limit to lines length. | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.line_length | ||
line-length: | ||
# PATCHED: Modern text editors handle long lines nicely | ||
max: 99999 | ||
allow-non-breakable-words: true | ||
allow-non-breakable-inline-mappings: false | ||
|
||
# Use this rule to require a new line character (`\n`) at the end of files. | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.new_line_at_end_of_file | ||
new-line-at-end-of-file: enable | ||
|
||
# Use this rule to force the type of new line characters. | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.new_lines | ||
new-lines: | ||
type: unix | ||
|
||
# Use this rule to prevent values with octal numbers. In YAML, numbers that start with `0` are interpreted as octal, but this is not always wanted. For instance `010` is the city code of Beijing, and should not be converted to `8`. | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.octal_values | ||
octal-values: | ||
forbid-implicit-octal: false | ||
forbid-explicit-octal: false | ||
|
||
# Use this rule to forbid trailing spaces at the end of lines. | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.trailing_spaces | ||
trailing-spaces: enable | ||
|
||
# Use this rule to forbid non-explictly typed truthy values other than `true` and `false`, for example `YES`, `False` and `off`. | ||
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.truthy | ||
truthy: | ||
level: warning | ||
... |
Oops, something went wrong.