Skip to content

Commit f74c1d1

Browse files
committed
Add pre-commit
1 parent 0db3dc0 commit f74c1d1

29 files changed

+713
-395
lines changed

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically
2+
version: 2
3+
updates:
4+
# Maintain dependencies for GitHub Actions
5+
- package-ecosystem: "github-actions"
6+
directory: "/"
7+
schedule:
8+
interval: "daily"

.github/linters/.markdown-lint.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# https://github.com/DavidAnson/markdownlint#rules--aliases
2+
# markdownlint -c .github/linters/.markdown-lint.yml .
3+
4+
# MD001/heading-increment/header-increment Heading levels should only increment by one level at a time
5+
MD001: false
6+
7+
# MD013/line-length Line length
8+
MD013: false
9+
10+
# MD024/no-duplicate-heading/no-duplicate-header
11+
MD024: false
12+
13+
# MD026/no-trailing-punctuation Trailing punctuation in heading
14+
MD026: false
15+
16+
# MD029/ol-prefix Ordered list item prefix
17+
MD029: false
18+
19+
# MD033/no-inline-html Inline HTML
20+
MD033: false
21+
22+
# MD040 fenced-code-language - Fenced code blocks should have a language specified
23+
MD040: false
24+
25+
# MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading
26+
MD041: false

.github/linters/.yaml-lint.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
extends: default
3+
4+
ignore: |
5+
vendor/
6+
7+
rules:
8+
comments: disable
9+
document-start: disable
10+
line-length: disable
11+
truthy: false

.github/workflows/lint.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Lint
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
misspell:
7+
name: Check Spelling Misspell All Files In Commit
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Install
12+
run: wget -O - -q https://git.io/misspell | sh -s -- -b .
13+
- name: Misspell
14+
run: git ls-files --empty-directory | xargs ./misspell -error
15+
pre-commit:
16+
name: Run pre-commit # https://pre-commit.com/
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
- uses: actions/setup-python@v2 # https://www.python.org/
21+
with:
22+
python-version: "3.x" # Version range or exact version of a Python version to use, using SemVer's version range syntax
23+
architecture: "x64" # optional x64 or x86. Defaults to x64 if not specified
24+
- name: Install dependencies # https://pip.pypa.io/en/stable/
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install pre-commit
28+
- name: Set PY
29+
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
30+
- uses: actions/[email protected]
31+
with:
32+
path: ~/.cache/pre-commit
33+
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
34+
- name: Run pre-commit
35+
run: pre-commit run --all-files

.github/workflows/super-linter.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Lint Code Base
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
build:
7+
name: Lint Code Base
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: github/[email protected]
12+
env:
13+
ERROR_ON_MISSING_EXEC_BIT: true
14+
VALIDATE_EDITORCONFIG: true
15+
VALIDATE_YAML: true
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
_site
12
.jekyll-cache
23
vendor

.pre-commit-config.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
# https://pre-commit.com/#installation
3+
default_stages: [commit, push]
4+
default_language_version:
5+
# force all unspecified Python hooks to run python3
6+
python: python3
7+
minimum_pre_commit_version: "1.20.0"
8+
repos:
9+
- repo: meta
10+
hooks:
11+
- id: identity
12+
- id: check-hooks-apply
13+
- repo: https://github.com/pre-commit/pre-commit-hooks
14+
rev: v4.0.1
15+
hooks:
16+
- id: check-added-large-files
17+
- id: check-case-conflict
18+
- id: check-merge-conflict
19+
- id: check-yaml
20+
- id: end-of-file-fixer
21+
exclude: ^_site/.*$
22+
- id: fix-byte-order-marker
23+
- id: mixed-line-ending
24+
- id: trailing-whitespace
25+
exclude: ^_site/.*$
26+
# - repo: https://github.com/Lucas-C/pre-commit-hooks
27+
# rev: v1.1.10
28+
# hooks:
29+
# - id: remove-tabs
30+
# - repo: https://github.com/codespell-project/codespell
31+
# rev: v2.0.0
32+
# hooks:
33+
# - id: codespell
34+
# name: Run codespell
35+
# description: Check spelling with codespell
36+
# entry: codespell --ignore-words=codespell.txt
37+
# exclude: ^_site/.*$
38+
# - repo: https://github.com/igorshubovych/markdownlint-cli
39+
# rev: v0.27.1
40+
# hooks:
41+
# - id: markdownlint
42+
# name: Run markdownlint
43+
# entry: markdownlint -c .github/linters/.markdown-lint.yml .
44+
# exclude: ^\.github/.*$
45+
# - repo: https://github.com/pre-commit/mirrors-prettier
46+
# rev: v2.3.1
47+
# hooks:
48+
# - id: prettier
49+
# exclude: ^.*\.html$|^_site/.*$
50+
- repo: https://github.com/adrienverge/yamllint
51+
rev: v1.26.1
52+
hooks:
53+
- id: yamllint
54+
name: Check YAML files with yamllint
55+
entry: yamllint --strict -c .github/linters/.yaml-lint.yml .
56+
types: [yaml]

404.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
layout: default
33
---
44

5-
65
<h1>
76
<a href="/">&uarr;</a>
87
404 Error

CNAME

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
maxbase.org
1+
maxbase.org

0 commit comments

Comments
 (0)