Skip to content

Commit

Permalink
Add Markdown linting to pre-commit
Browse files Browse the repository at this point in the history
- Add a basic config file
- Lint Markdown

https://www.npmjs.com/package/markdownlint-cli
  • Loading branch information
jbampton committed Nov 10, 2020
1 parent 08d67ad commit 1049b32
Show file tree
Hide file tree
Showing 9 changed files with 97 additions and 7 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
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -520,3 +520,11 @@ 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: 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']
2 changes: 1 addition & 1 deletion BREEZE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2006,7 +2006,7 @@ This is the current syntax for `./breeze <./breeze>`_:
consistent-pylint daysago-import-check 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 isort language-matters
lint-dockerfile lint-openapi mermaid mixed-line-ending mypy mypy-helm
lint-dockerfile lint-openapi markdownlint mermaid mixed-line-ending mypy mypy-helm
no-relative-imports pre-commit-descriptions provide-create-sessions
providers-init-file pydevd pydocstyle pylint pylint-tests python-no-log-warn
pyupgrade restrict-start_date rst-backticks setup-order setup-installation
Expand Down
4 changes: 3 additions & 1 deletion STATIC_CODE_CHECKS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,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 UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ Arguments for dataproc_properties dataproc_jars

#### `airflow.providers.google.cloud.operators.cloud_storage_transfer_service.CloudDataTransferServiceCreateJobOperator`

To obtain pylint compatibility the `filter ` argument in `CloudDataTransferServiceCreateJobOperator`
To obtain pylint compatibility the `filter` argument in `CloudDataTransferServiceCreateJobOperator`
has been renamed to `request_filter`.

#### `airflow.providers.google.cloud.hooks.cloud_storage_transfer_service.CloudDataTransferServiceHook`
Expand Down
6 changes: 4 additions & 2 deletions UPGRADING_TO_2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ assists users migrating to a new version.
- [Drop legacy UI in favor of FAB RBAC UI](#drop-legacy-ui-in-favor-of-fab-rbac-ui)
- [Breaking Change in OAuth](#breaking-change-in-oauth)
- [Step 5: Upgrade KubernetesExecutor settings](#step-5-upgrade-kubernetesexecutor-settings)
- [The KubernetesExecutor Will No Longer Read from the airflow.cfg for Base Pod Configurations](#the-kubernetesexecutor-will-no-longer-read-from-the-airflowcfg-for-base-pod-configurations)
- [The `executor_config` Will Now Expect a `kubernetes.client.models.V1Pod` Class When Launching Tasks](#the-executor_config-will-now-expect-a-kubernetesclientmodelsv1pod-class-when-launching-tasks)
- [Appendix](#appendix)
- [Changed Parameters for the KubernetesPodOperator](#changed-parameters-for-the-kubernetespodoperator)
- [Migration Guide from Experimental API to Stable API v1](#migration-guide-from-experimental-api-to-stable-api-v1)
Expand Down Expand Up @@ -316,7 +318,7 @@ For more information, visit https://flask-appbuilder.readthedocs.io/en/latest/se

## Step 5: Upgrade KubernetesExecutor settings

#### The KubernetesExecutor Will No Longer Read from the airflow.cfg for Base Pod Configurations
### The KubernetesExecutor Will No Longer Read from the airflow.cfg for Base Pod Configurations

In Airflow 2.0, the KubernetesExecutor will require a base pod template written in yaml. This file can exist
anywhere on the host machine and will be linked using the `pod_template_file` configuration in the airflow.cfg.
Expand Down Expand Up @@ -371,7 +373,7 @@ fs_group
[kubernetes_labels]
```

#### The `executor_config` Will Now Expect a `kubernetes.client.models.V1Pod` Class When Launching Tasks
### The `executor_config` Will Now Expect a `kubernetes.client.models.V1Pod` Class When Launching Tasks

In Airflow 1.10.x, users could modify task pods at runtime by passing a dictionary to the `executor_config` variable.
Users will now have full access the Kubernetes API via the `kubernetes.client.models.V1Pod`.
Expand Down
1 change: 1 addition & 0 deletions breeze-complete
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ isort
language-matters
lint-dockerfile
lint-openapi
markdownlint
mermaid
mixed-line-ending
mypy
Expand Down
2 changes: 1 addition & 1 deletion chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,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
2 changes: 1 addition & 1 deletion dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1435,7 +1435,7 @@ EOF
Update "Announcements" page at the [Official Airflow website](https://airflow.apache.org/announcements/)
----------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
## Prepare the Regular Provider Packages Alpha
Expand Down

0 comments on commit 1049b32

Please sign in to comment.