aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sping@gentoo.org>2023-10-06 19:45:10 +0200
committerSebastian Pipping <sping@gentoo.org>2023-10-06 19:45:14 +0200
commita1938e4d5e7184b448b812fb4db97151ce79db15 (patch)
treea6bf23e87cbdbeb0d92151cf85c37fd504d0d5bf
parentMerge branch 'pyproject-toml-fix-license' (diff)
parentpre-commit: Integrate with Github Actions (diff)
downloadelogv-a1938e4d5e7184b448b812fb4db97151ce79db15.tar.gz
elogv-a1938e4d5e7184b448b812fb4db97151ce79db15.tar.bz2
elogv-a1938e4d5e7184b448b812fb4db97151ce79db15.zip
Merge branch 'pre-commit-github-actions'
Signed-off-by: Sebastian Pipping <sping@gentoo.org>
-rw-r--r--.git-blame-ignore-revs4
-rw-r--r--.github/workflows/pre-commit-run.yml58
-rw-r--r--.pre-commit-config.yaml42
-rw-r--r--ChangeLog8
-rw-r--r--po/elogv.pot1
-rw-r--r--po/es.po1
6 files changed, 108 insertions, 6 deletions
diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
index b72aa08..3fe3d65 100644
--- a/.git-blame-ignore-revs
+++ b/.git-blame-ignore-revs
@@ -2,3 +2,7 @@
cf01cb49e14730c2323da4ef9f8093935ef93fb9
# Reformat project with isort
c08fea8ad853d1508b412f06dd9636273912f1c1
+# pre-commit: Mass-apply end-of-file-fixer
+1c9eb420a0305c9aab435b161475b1db9508963b
+# pre-commit: Mass-apply trailing-whitespace
+b5e0a6f4f6ae76bd269b22ac3683d8c35c3e8436
diff --git a/.github/workflows/pre-commit-run.yml b/.github/workflows/pre-commit-run.yml
new file mode 100644
index 0000000..61f4474
--- /dev/null
+++ b/.github/workflows/pre-commit-run.yml
@@ -0,0 +1,58 @@
+# This file is part of elogv
+#
+# Authors (in chronological order):
+# - Sebastian Pipping (sping) <sebastian@pipping.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+name: Run pre-commit on all files
+
+on:
+- pull_request
+- push
+- workflow_dispatch
+
+# Minimum permissions for security
+permissions:
+ contents: read
+
+jobs:
+ run_pre_commit:
+ name: Run pre-commit on all files
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
+ with:
+ python-version: 3.12
+
+ - name: Install pre-commit
+ run: |-
+ pip install \
+ --disable-pip-version-check \
+ --user \
+ --no-warn-script-location \
+ pre-commit
+ echo "PATH=${HOME}/.local/bin:${PATH}" >> "${GITHUB_ENV}"
+
+ - name: Install pre-commit hooks
+ run: |-
+ pre-commit install --install-hooks
+
+ - name: Run pre-commit on all files
+ run: |-
+ pre-commit run --all-files --show-diff-on-failure
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000..7e451b2
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,42 @@
+# This file is part of elogv
+#
+# Authors (in chronological order):
+# - Sebastian Pipping (sping) <sebastian@pipping.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+repos:
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v4.4.0
+ hooks:
+ - id: check-merge-conflict
+ - id: end-of-file-fixer
+ - id: trailing-whitespace
+
+ - repo: https://github.com/psf/black
+ rev: 23.9.1
+ hooks:
+ - id: black
+ args: ['--target-version', 'py38']
+
+ - repo: https://github.com/PyCQA/isort
+ rev: 5.12.0
+ hooks:
+ - id: isort
+
+ - repo: https://github.com/astral-sh/ruff-pre-commit
+ rev: v0.0.291
+ hooks:
+ - id: ruff
diff --git a/ChangeLog b/ChangeLog
index 8735658..8bf7b0a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -59,7 +59,7 @@
* elogv: fixed bug #249536 on Gentoo Bugzilla, there was a problem when
using the dd command, thanks to Arnaud Lech <arnaud@bdefracte.org> for the
patch
-
+
2008-11-01 Luca Marturana (luca89) <lucamarturana@gmail.com>
* elogv: fixed bug #236056 on Gentoo Bugzilla, now elogv works fine even
if the terminal has a black background
@@ -94,9 +94,9 @@
list of files can be ordered by class warning level
* setup.py: Added support to install *.po files and localized manpages
-2008-03-21 Luca Marturana (luca89) <lucamarturana@gmail.com>
- * elogv: Fixed bug #214063 on Gentoo Bugzilla, thanks to Michał Kiedrowicz
- <esqualante@o2.pl>
+2008-03-21 Luca Marturana (luca89) <lucamarturana@gmail.com>
+ * elogv: Fixed bug #214063 on Gentoo Bugzilla, thanks to Michał Kiedrowicz
+ <esqualante@o2.pl>
2008-03-05 Luca Marturana (luca89) <lucamarturana@gmail.com>
* elogv: Tagging files with the alarm level, thanks to
diff --git a/po/elogv.pot b/po/elogv.pot
index a381ce3..53300b1 100644
--- a/po/elogv.pot
+++ b/po/elogv.pot
@@ -74,4 +74,3 @@ msgstr ""
#: ../elogv:528
msgid "Please check if the directory exists and if it's readable by your user."
msgstr ""
-
diff --git a/po/es.po b/po/es.po
index f642952..7a78279 100644
--- a/po/es.po
+++ b/po/es.po
@@ -102,4 +102,3 @@ msgstr "Imposible abrir"
#: ../elogv:528
msgid "Please check if the directory exists and if it's readable by your user."
msgstr "Por favor, compruebe si el directorio existe y si es legible por su usuario."
-