Skip to content

Commit

Permalink
fix: add extension error loggings for mypy
Browse files Browse the repository at this point in the history
* fix: add error logging for mypy extensions (#95)

* docs: add Docker container usage in local env
  • Loading branch information
bowentan committed Dec 2, 2022
1 parent 2d4a4a5 commit 88280f1
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 11 deletions.
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

- package-ecosystem: "docker" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
4 changes: 2 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sphinx_mdinclude>=0.5.3
furo>=2022.9.15
sphinx_mdinclude==0.5.3
furo==2022.9.15
14 changes: 13 additions & 1 deletion docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -241,4 +241,16 @@ Linter configurations
Example configuration files for linters are given in :file:`LINTER_CONFIGS` of GitHub_ repository
as templates. You can modify them as you need.

.. _GitHub: https://github.com/bowentan/glob-linters
.. _GitHub: https://github.com/bowentan/glob-linters


Run as a Docker container
-------------------------

You can also use :program:`glob-linters` as a local Docker container by pulling the image and
expose your workspace to the container, so as to test it as the GitHub action.

.. code-block:: console
$ docker pull ghcr.io/bowentan/glob-linters:v0
$ docker run --name glob-linters-test --workdir /github/workspace --rm -v "<your workspace to be run against>":"/github/workspace" ghcr.io/bowentan/glob-linters:v0
2 changes: 2 additions & 0 deletions glob_linters/linters.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,5 +225,7 @@ def process_output(self) -> None:
logger.error("Found errors:")
for err in self.stdout:
logger.error("\t%s", err)
for err in self.stderr:
logger.error("\t%s", err)
else:
logger.info("Check passed.")
4 changes: 3 additions & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ Sphinx==5.1.1
twine==4.0.1
pytest==7.1.3
black==22.8.0
tox==3.26.0
tox==3.26.0
sphinx_mdinclude==0.5.3
furo==2022.9.29
14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
setup_requirements = ["setuptools_scm"]

requirements = [
"clang-format>=14.0.6",
"cpplint>=1.6.1",
"pylint>=2.15.2",
"flake8>=5.0.4",
"black>=22.8.0",
"isort>=5.10.1",
"mypy>=0.971",
"clang-format==14.0.6",
"cpplint==1.6.1",
"pylint==2.15.2",
"flake8==5.0.4",
"black==22.8.0",
"isort==5.10.1",
"mypy==0.971",
]

test_requirements = [
Expand Down

0 comments on commit 88280f1

Please sign in to comment.