mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
lint/pre-commit/ci: replace shfmt => beautysh
This commit is contained in:
@@ -9,8 +9,9 @@ repos:
|
||||
hooks:
|
||||
- id: flake8
|
||||
language_version: python3
|
||||
- repo: https://github.com/casperdcl/sh
|
||||
- repo: https://github.com/lovesegfault/beautysh
|
||||
rev: master
|
||||
hooks:
|
||||
- id: shfmt
|
||||
language: golang
|
||||
- id: beautysh
|
||||
language_version: python3
|
||||
args: [-i, '2'] # 2-space indentaion
|
||||
|
||||
+1
-8
@@ -24,7 +24,7 @@ stages:
|
||||
jobs:
|
||||
include:
|
||||
# patch formatting checks
|
||||
- name: "Python formatting"
|
||||
- name: "Check patch formatting"
|
||||
stage: check
|
||||
os: linux
|
||||
language: python
|
||||
@@ -32,13 +32,6 @@ jobs:
|
||||
before_install:
|
||||
install:
|
||||
script: ./scripts/ci/check_patch.sh
|
||||
- name: "Script formatting"
|
||||
os: linux
|
||||
language: go
|
||||
go: 1.13
|
||||
before_install:
|
||||
install:
|
||||
script: ./scripts/ci/check_scripts.sh
|
||||
# test jobs
|
||||
- name: "3.7 on Windows"
|
||||
stage: test
|
||||
|
||||
@@ -9,7 +9,4 @@ pip install Pygments collective.checkdocs pre-commit
|
||||
python setup.py checkdocs
|
||||
|
||||
# stop the build if there are any formatting errors
|
||||
err=0
|
||||
pre-commit run --all-files black || err=1
|
||||
pre-commit run --all-files flake8 || err=1
|
||||
exit $err
|
||||
pre-commit run --all-files
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt
|
||||
|
||||
# stop the build if there are any formatting errors
|
||||
shfmt -l -d -i 2 -ci -w .
|
||||
Reference in New Issue
Block a user