Skip to content

Commit

Permalink
Yaml fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lowell80 committed Oct 16, 2023
1 parent 2341b8b commit 6eec847
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 24 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ jobs:
path: |-
$HOME/.cache/pip
$HOME/.pyenv
key: '${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles(''requirements.txt'') }}'
key: >
${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles(''requirements.txt'') }}
- uses: actions/checkout@v3

- name: MacOS pyenv setup
Expand Down Expand Up @@ -122,7 +123,8 @@ jobs:

###############################################################
# This fails with:
# requests.exceptions.HTTPError: 422 Client Error: Unprocessable Entity for url: https://coveralls.io/api/v1/jobs
# requests.exceptions.HTTPError: 422 Client Error:
# Unprocessable Entity for url: https://coveralls.io/api/v1/jobs
# - run: coveralls
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
22 changes: 12 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
exclude: (\.bat|\.csv)$

- repo: https://github.com/PyCQA/isort.git
rev: 5.12.0
rev: "5.12.0"
hooks:
- id: isort
exclude: (ksconf/ext/)
Expand Down Expand Up @@ -51,19 +51,21 @@ repos:
entry: ^(from build\.lib|import build\.)
language: pygrep
types: [python]

- id: ksconf-unittest
name: Run all unit tests for ksconf
language: script
entry: run_tests.py
types: [python]
pass_filenames: false
# Way too much noise.... (or I just have bad code, either way it's too much)
#- repo: https://github.com/pre-commit/mirrors-pylint
# rev: master
# hooks:
# - id: pylint

#- repo: https://github.com/jorisroovers/gitlint
# rev: master
# hooks:
# - id: gitlint
# Way too much noise.... (or I just have bad code, either way it's too much)
# - repo: https://github.com/pylint-dev/pylint
# rev: v3.0.1
# hooks:
# - id: pylint

# - repo: https://github.com/jorisroovers/gitlint
# rev: master
# hooks:
# - id: gitlint
26 changes: 16 additions & 10 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# REPO MOVE!
#
# Please update your '.pre-commit-config.yaml' files.
# The new purpose-built repository is located here: https://github.com/Kintyre/ksconf-pre-commit
# The new purpose-built repository is located here:
# https://github.com/Kintyre/ksconf-pre-commit
#
# Support for running pre-commit directly against *this* repository will
# continue to through 2024, but will be subject to increasingly aggressive reminders ;-)
# Support for running pre-commit directly against *this* repository will continue
# to through 2024, but will be subject to increasingly aggressive reminders ;-)
#
# Note tha the 'lxml' requirement will be dropped much sooner and therefore may require tweaking,
# so you may as well go ahead and switch repos!
# Note tha the 'lxml' requirement will be dropped much sooner and therefore may require
# tweaking, so you may as well go ahead and switch repos!
#
# After v0.13, we'll sunset these hooks using the technique descried here: https://github.com/pre-commit/pre-commit/issues/2003#issuecomment-895375482
# After v0.13, we'll sunset these hooks using the technique descried here:
# https://github.com/pre-commit/pre-commit/issues/2003#issuecomment-895375482
#
# name: {OLDNAME} Migrated to {REPO}
# language: fail
Expand All @@ -23,16 +25,20 @@

- id: ksconf-sort
name: Ksconf Splunk CONF - Sort conf files
description: Sort all stanzas and keys in .conf files. Files can be skipped by adding a comment with KSCONF-NO-SORT
description: >
Sort all stanzas and keys in .conf files. Files can be skipped by adding a
comment with KSCONF-NO-SORT
entry: ksconf sort -i -q
language: python
files: (\.conf|(local|default)\.meta)$

- id: ksconf-xml-format
# If you intend to use this, you must add: additional_dependencies: [lxml] to your .pre-commit-config.yaml
# Even better. Migrate to 'ksconf-pre-commit'!
# If you intend to use this, you must add: additional_dependencies: [lxml] to your
# .pre-commit-config.yaml Even better. Migrate to 'ksconf-pre-commit'!
name: Ksconf Splunk CONF - Normalize XML
description: Normalize and apply consistent XML indentation and CDATA usage for XML dashboards and navigation files.
description: >
Normalize and apply consistent XML indentation and CDATA usage for XML
dashboards and navigation files.
entry: ksconf xml-format -q
language: python
files: data/ui/(views|nav)/[^/]+\.xml$
2 changes: 0 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ build:
# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true

Expand Down
3 changes: 3 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ rules:
line-length:
max: 100
level: warning
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: true

truthy:
# Too many "on" keys in GitHub actions...
check-keys: false

0 comments on commit 6eec847

Please sign in to comment.