Skip to content

Commit

Permalink
Add Markdown linting to pre-commit (#11465)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbampton authored and kaxil committed Nov 18, 2020
1 parent c7f1587 commit fac7687
Show file tree
Hide file tree
Showing 8 changed files with 1,553 additions and 96 deletions.
77 changes: 77 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
---
# MD003/heading-style/header-style
MD003: false

# MD004/ul-style
MD004: false

# MD007/ul-indent
MD007: false

# MD012/no-multiple-blanks
MD012: false

# MD013 Line length
MD013: false

# MD014/commands-show-output
MD014: false

# MD022/blanks-around-headings/blanks-around-headers
MD022: false

# MD024/no-duplicate-heading/no-duplicate-header
MD024: false

# MD026/no-trailing-punctuation
MD026: false

# MD029/ol-prefix
MD029: false

# MD030/list-marker-space
MD030: false

# MD031/blanks-around-fences
MD031: false

# MD032/blanks-around-lists
MD032: false

# MD033/no-inline-html
MD033: false

# MD034/no-bare-urls
MD034: false

# MD036/no-emphasis-as-heading/no-emphasis-as-header
MD036: false

# MD040/fenced-code-language
MD040: false

# MD041/first-line-heading/first-line-h1
MD041: false

# MD045/no-alt-text
MD045: false

# MD046/code-block-style
MD046: false
32 changes: 20 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,26 @@ repos:
files: ^breeze$|^breeze-complete$|\.sh$|\.bash$|\.bats$
exclude: ^tests/bats/in_container/.*bats$|^scripts/in_container/.*sh$
pass_filenames: false
- id: pre-commit-descriptions
name: Check if pre-commits are described
entry: ./scripts/ci/pre_commit/pre_commit_check_pre_commits.sh
language: system
files: ^.pre-commit-config.yaml$|^STATIC_CODE_CHECKS.rst|^breeze-complete$
require_serial: true
- id: sort-in-the-wild
name: Sort INTHEWILD.md alphabetically
entry: ./scripts/ci/pre_commit/pre_commit_sort_in_the_wild.sh
language: system
files: ^.pre-commit-config.yaml$|^INTHEWILD.md$
require_serial: true
- id: markdownlint
name: Run markdownlint
description: "Checks the style of Markdown files."
entry: markdownlint
language: node
types: [markdown]
files: \.(md|mdown|markdown)$
additional_dependencies: ['markdownlint-cli']
- id: build
name: Check if image build is needed
entry: ./scripts/ci/pre_commit/pre_commit_ci_build.sh 3.6 false
Expand Down Expand Up @@ -364,15 +384,3 @@ repos:
entry: "./scripts/ci/pre_commit/pre_commit_in_container_bats_test.sh"
files: ^tests/bats/in_container/.*.bats$|^scripts/in_container/.*sh
pass_filenames: false
- id: pre-commit-descriptions
name: Check if pre-commits are described
entry: ./scripts/ci/pre_commit/pre_commit_check_pre_commits.sh
language: system
files: ^.pre-commit-config.yaml$|^STATIC_CODE_CHECKS.rst|^breeze-complete$
require_serial: true
- id: sort-in-the-wild
name: Sort INTHEWILD.md alphabetically
entry: ./scripts/ci/pre_commit/pre_commit_sort_in_the_wild.sh
language: system
files: ^.pre-commit-config.yaml$|^INTHEWILD.md$
require_serial: true
8 changes: 4 additions & 4 deletions BREEZE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1863,10 +1863,10 @@ This is the current syntax for `./breeze <./breeze>`_:
check-hooks-apply check-integrations check-merge-conflict check-xml debug-statements
detect-private-key doctoc dont-use-safe-filter end-of-file-fixer fix-encoding-pragma
flake8 forbid-tabs helm-lint incorrect-use-of-LoggingMixin insert-license
language-matters lint-dockerfile lint-openapi mixed-line-ending mypy mypy-helm
no-relative-imports pre-commit-descriptions pydevd python2-compile python2-fastcheck
python-no-log-warn rst-backticks setup-order setup-installation shellcheck
sort-in-the-wild trailing-whitespace update-breeze-file update-extras
language-matters lint-dockerfile lint-openapi markdownlint mermaid mixed-line-ending
mypy mypy-helm no-relative-imports pre-commit-descriptions pydevd python2-compile
python2-fastcheck python-no-log-warn rst-backticks setup-order setup-installation
shellcheck sort-in-the-wild trailing-whitespace update-breeze-file update-extras
update-local-yml-file yamllint
You can pass extra arguments including options to to the pre-commit framework as
Expand Down
4 changes: 3 additions & 1 deletion STATIC_CODE_CHECKS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@ require Breeze Docker images to be installed locally:
----------------------------------- ---------------------------------------------------------------- ------------
``lint-openapi`` Lints openapi specification.
----------------------------------- ---------------------------------------------------------------- ------------
``mixed-line-ending`` Detects if mixed line ending is used (\r vs. \r\n).
``markdownlint`` Lints Markdown files.
----------------------------------- ---------------------------------------------------------------- ------------
``mermaid`` Generates diagrams from mermaid files.
----------------------------------- ---------------------------------------------------------------- ------------
``mixed-line-ending`` Detects if mixed line ending is used (\r vs. \r\n).
----------------------------------- ---------------------------------------------------------------- ------------
``mypy`` Runs mypy. *
----------------------------------- ---------------------------------------------------------------- ------------
``mypy-helm`` Runs mypy. *
Expand Down
2 changes: 1 addition & 1 deletion airflow/www/templates/airflow/variables/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ store. This data can be edited under the "Admin" admin tab, but sometimes
it is preferable to use a form that can perform checking and provide a nicer
interface.

### Adding a new form
## Adding a new form

1. Create an html template in `templates/variables` folder
2. Provide an interface for the user to provide input data
Expand Down
2 changes: 2 additions & 0 deletions breeze-complete
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ insert-license
language-matters
lint-dockerfile
lint-openapi
markdownlint
mermaid
mixed-line-ending
mypy
mypy-helm
Expand Down
2 changes: 1 addition & 1 deletion chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ helm install --name my-release \
--set enablePodLaunching=false .
```

## Autoscaling with KEDA
## Autoscaling with KEDA

KEDA stands for Kubernetes Event Driven Autoscaling. [KEDA](https://github.com/kedacore/keda) is a custom controller that allows users to create custom bindings
to the Kubernetes [Horizontal Pod Autoscaler](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/).
Expand Down

0 comments on commit fac7687

Please sign in to comment.