Fix pre-commit hook (#3882)
This commit is contained in:
@@ -85,7 +85,7 @@ def _check_dir(dir_name):
|
||||
tree = schema_docs.parse_node(schema)
|
||||
props, defs = schema_docs.render_node(tree)
|
||||
doc = schema_docs.DOC.format(title=schema.get('title'), properties=props,
|
||||
definitions=defs or '')
|
||||
definitions=defs or '').strip()
|
||||
new_doc_content = f'{doc}\n'
|
||||
|
||||
state = State.OK
|
||||
|
||||
@@ -14,13 +14,14 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
# shellcheck disable=SC2034
|
||||
DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
||||
|
||||
echo -- Boilerplate check --
|
||||
python3 tools/check_boilerplate.py $PWD
|
||||
python3 tools/check_boilerplate.py "$PWD"
|
||||
|
||||
echo -- Terraform format --
|
||||
terraform fmt -recursive -check -diff $PWD
|
||||
terraform fmt -recursive -check -diff "$PWD"
|
||||
|
||||
echo -- READMEs --
|
||||
python3 tools/check_documentation.py --no-show-summary modules fast blueprints
|
||||
@@ -29,7 +30,7 @@ echo -- Schema docs --
|
||||
python3 tools/check_schema_docs.py --no-show-summary modules fast blueprints
|
||||
|
||||
echo -- Links --
|
||||
python3 tools/check_links.py --no-show-summary $PWD
|
||||
python3 tools/check_links.py --no-show-summary "$PWD"
|
||||
|
||||
echo -- FAST Names --
|
||||
python3 tools/check_names.py --prefix-length=10 --failed-only fast/stages
|
||||
@@ -39,8 +40,8 @@ yamllint -c .yamllint .
|
||||
|
||||
echo -- Python formatting --
|
||||
yapf -p -d -r \
|
||||
tools/*.py \
|
||||
blueprints
|
||||
tools/*.py \
|
||||
blueprints
|
||||
|
||||
echo -- Version checks --
|
||||
find . -type f -name 'versions.tf' -exec diff -I '[[:space:]]*module_name' -ub default-versions.tf {} \;
|
||||
|
||||
@@ -177,7 +177,7 @@ def main(paths=None):
|
||||
tree = parse_node(schema)
|
||||
props, defs = render_node(tree)
|
||||
doc = DOC.format(title=schema.get('title'), properties=props,
|
||||
definitions=defs or '')
|
||||
definitions=defs or '').strip()
|
||||
f_doc = f.with_suffix('.md')
|
||||
f_doc.write_text(f'{doc}\n')
|
||||
logging.info(f'doc {f}')
|
||||
|
||||
@@ -51,7 +51,7 @@ terraform {{
|
||||
}}
|
||||
"""
|
||||
|
||||
FAST_VERSIONS_TEMPLATE = "\n# FAST release: {fast_release}"
|
||||
FAST_VERSIONS_TEMPLATE = "\n# FAST release: {fast_release}\n"
|
||||
|
||||
|
||||
def extract_variables(template, interpolated_string):
|
||||
|
||||
Reference in New Issue
Block a user