misc,python: Add pre-commit-hook-yamlfmt to pre-commit
This automatically formats .yaml files. By deault has the following parameters: * `mapping`: 4 spaces. * `sequence`: 6 spaces. * `offset`: 4 spaces. * `colons`: do not align top-level colons. * `width`: None. Change-Id: Iee5194cd57b7b162fd7e33aa6852b64c5578a3d2
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
---
|
||||
# Copyright (c) 2022 Arm Limited
|
||||
# All rights reserved.
|
||||
#
|
||||
@@ -33,7 +34,7 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
minimum_pre_commit_version: "2.18"
|
||||
minimum_pre_commit_version: '2.18'
|
||||
|
||||
default_language_version:
|
||||
python: python3
|
||||
@@ -62,6 +63,10 @@ repos:
|
||||
- id: mixed-line-ending
|
||||
args: [--fix=lf]
|
||||
- id: check-case-conflict
|
||||
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
|
||||
rev: 0.2.3
|
||||
hooks:
|
||||
- id: yamlfmt
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 22.6.0
|
||||
hooks:
|
||||
@@ -72,18 +77,18 @@ repos:
|
||||
name: gem5 style checker
|
||||
entry: util/git-pre-commit.py
|
||||
always_run: true
|
||||
exclude: ".*"
|
||||
exclude: .*
|
||||
language: system
|
||||
description: 'The gem5 style checker hook.'
|
||||
description: The gem5 style checker hook.
|
||||
- id: gem5-commit-msg-checker
|
||||
name: gem5 commit msg checker
|
||||
entry: ext/git-commit-msg
|
||||
language: system
|
||||
stages: [commit-msg]
|
||||
description: 'The gem5 commit message checker hook.'
|
||||
description: The gem5 commit message checker hook.
|
||||
- id: gerrit-commit-msg-job
|
||||
name: gerrit commit message job
|
||||
entry: util/gerrit-commit-msg-hook
|
||||
language: system
|
||||
stages: [commit-msg]
|
||||
description: 'Adds Change-ID to the commit message. Needed by Gerrit.'
|
||||
description: Adds Change-ID to the commit message. Needed by Gerrit.
|
||||
|
||||
Reference in New Issue
Block a user