Skip to content

Commit

Permalink
run some pre-commit checks
Browse files Browse the repository at this point in the history
  • Loading branch information
blackliner committed Feb 8, 2024
1 parent 55157e4 commit 172daa2
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 16 deletions.
38 changes: 38 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
default_stages: [commit]
default_install_hook_types: [pre-commit, prepare-commit-msg]
exclude: |
(?x)^(
^docs/reference/api.md
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=lf]
- id: trailing-whitespace
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: text-unicode-replacement-char
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.7.0-4
hooks:
- id: shfmt-docker
alias: shfmt
args: ["-i", "2"]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.6
hooks:
- id: shellcheck
- repo: https://github.com/google/yamlfmt
rev: v0.10.0
hooks:
- id: yamlfmt
- repo: https://github.com/crate-ci/typos
rev: v1.18.0
hooks:
- id: typos
exclude_types:
- svg
3 changes: 3 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[default.extend-words]
CLOS = "CLOS"
leafs = "leafs"
1 change: 1 addition & 0 deletions .yamlfmt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
retain_line_breaks: True
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ ALIAS ?= master
deploy: docker ## Deploy documentation version with mike.
$(RUN) mike deploy -b publish -u $(RELEASE) $(ALIAS)

# TODO we need to "deploy dev" in master and "deploy -u alpha-x latest" in release/alpha-x branches
# TODO we need to "deploy dev" in master and "deploy -u alpha-x latest" in release/alpha-x branches
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

[![Netlify Status](https://api.netlify.com/api/v1/badges/76ba2fb4-b33a-4f0f-b81d-c61e3b603bc9/deploy-status)](https://app.netlify.com/sites/hedgehog-docs/deploys)

Published to [https://docs.githedgehog.com](https://docs.githedgehog.com).
Published to [https://docs.githedgehog.com](https://docs.githedgehog.com).
22 changes: 8 additions & 14 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ site_url: https://docs.githedgehog.com/
site_description: Hedgehog Open Network Fabric Documentation
site_author: Hedgehog Authors
copyright: ©2023 Hedgehog

theme:
name: material
logo: assets/logo.webp
Expand Down Expand Up @@ -35,14 +34,12 @@ theme:
toggle:
icon: material/weather-night
name: Switch to dark mode

# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/weather-sunny
name: Switch to light mode

extra:
homepage: https://docs.githedgehog.com
version:
Expand All @@ -51,15 +48,13 @@ extra:
social:
- icon: fontawesome/brands/linkedin
link: https://www.linkedin.com/company/githedgehog/

# consent:
# title: Cookie consent
# description: >-
# We use cookies to recognize your repeated visits and preferences, as well
# as to measure the effectiveness of our documentation and whether users
# find what they're searching for. With your consent, you're helping us to
# make our documentation better.

# consent:
# title: Cookie consent
# description: >-
# We use cookies to recognize your repeated visits and preferences, as well
# as to measure the effectiveness of our documentation and whether users
# find what they're searching for. With your consent, you're helping us to
# make our documentation better.
repo_url: https://github.com/githedgehog/docs
repo_name: githedgehog/docs
# edit_uri: edit/master/docs/
Expand All @@ -74,7 +69,7 @@ plugins:
order_by: title
- git-revision-date-localized:
enable_creation_date: true
# - htmlproofer # https://github.com/manuzhang/mkdocs-htmlproofer-plugin
# - htmlproofer # https://github.com/manuzhang/mkdocs-htmlproofer-plugin

markdown_extensions:
- abbr
Expand Down Expand Up @@ -105,7 +100,6 @@ markdown_extensions:
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg

watch:
- includes
- overrides

0 comments on commit 172daa2

Please sign in to comment.