Skip to content

Commit

Permalink
Merge f89bd09 into 5ca003d
Browse files Browse the repository at this point in the history
  • Loading branch information
vint21h committed Jul 26, 2022
2 parents 5ca003d + f89bd09 commit 2b3c0d7
Show file tree
Hide file tree
Showing 15 changed files with 330 additions and 15 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @vint21h @Artesius
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!--- Provide a general summary of the issue in the Title above -->

## Expected Behavior
<!--- Tell what should happen -->

## Current Behavior
<!--- Tell what happens instead of the expected behavior -->

## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->

## Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.

## Context (Environment)
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps come up with a solution that is most useful in the real world -->

<!--- Provide a general summary of the issue in the Title above -->

## Detailed Description
<!--- Provide a detailed description of the change or addition you are proposing -->

## Possible Implementation
<!--- Not obligatory, but suggest an idea for implementing addition or change -->
18 changes: 18 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->

## Related Issue
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
14 changes: 14 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Security Policy

## Supported Versions

So, because this is not a thing that can produce security problems in the project using it,
security policy is very simple: supported only the last major or minor branch.

| Version | Supported |
|-----------| ------------------ |
| 0.1.x | :white_check_mark: |

## Reporting a Vulnerability

If you found something that in your opinion may produce any security problem, please create a [new issue](https://github.com/Anadea/pre-commit-config-shellcheck/issues/new/).
1 change: 1 addition & 0 deletions .github/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: true
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
allow:
- dependency-name: "all"
dependency-type: "direct"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "build"
on:
push:
branches:
- "*"
tags:
- "*"
pull_request:
branches:
- "*"
workflow_dispatch:
workflow_call:
env:
NAME: "pre-commit-config-shellcheck"
DEFAULT_PYTHON_VERSION: "3.10"
jobs:
check-requirements:
uses: "./.github/workflows/check-requirements.yml"
check:
name: "${{ matrix.toxenv }}"
uses: "./.github/workflows/check.yml"
test:
name: "${{ matrix.python-version }}"
uses: "./.github/workflows/test.yml"
if: success()
needs: ["check"]
coveralls:
uses: "./.github/workflows/coveralls.yml"
if: success()
needs: ["test", "check"]
36 changes: 36 additions & 0 deletions .github/workflows/check-requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "check-requirements"
on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
workflow_call:
env:
DEFAULT_PYTHON_VERSION: "3.10"
jobs:
check-requirements:
name: "check-requirements"
runs-on: "ubuntu-latest"
steps:
- name: "Git clone"
id: "git-clone"
uses: "actions/checkout@v3.0.2"
- name: "Set up Python ${{ env.DEFAULT_PYTHON_VERSION }}"
id: "set-up-python"
uses: "actions/setup-python@v4.1.0"
with:
python-version: "${{ env.DEFAULT_PYTHON_VERSION }}"
- name: "Pip cache"
id: "pip-cache"
uses: "actions/cache@v3.0.5"
with:
path: "~/.cache/pip"
key: "${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}"
restore-keys: |
"${{ runner.os }}-pip-"
- name: "Install requirements"
id: "install-requirements"
run: "make install"
- name: "Check outdated requirements"
id: "check-outdated-requirements"
continue-on-error: true
run: "pip-outdated"
47 changes: 47 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "check"
on:
workflow_dispatch:
workflow_call:
env:
NAME: "pre-commit-config-shellcheck"
DEFAULT_PYTHON_VERSION: "3.10"
jobs:
check:
name: "${{ matrix.toxenv }}"
runs-on: "ubuntu-latest"
strategy:
matrix:
toxenv: ["check", "check-build"]
steps:
- name: "Git clone"
id: "git-clone"
uses: "actions/checkout@v3.0.2"
- name: "Set up Python ${{ env.DEFAULT_PYTHON_VERSION }}"
id: "set-up-python"
uses: "actions/setup-python@v4.1.0"
with:
python-version: "${{ env.DEFAULT_PYTHON_VERSION }}"
- name: "Pip cache"
id: "pip-cache"
uses: "actions/cache@v3.0.5"
with:
path: "~/.cache/pip"
key: "${{ runner.os }}-pip-${{ matrix.toxenv }}-${{ hashFiles('setup.cfg') }}"
restore-keys: |
"${{ runner.os }}-pip-${{ matrix.toxenv }}-"
"${{ runner.os }}-pip-"
- name: "Pre-commit cache"
id: "pre-commit-cache"
uses: "actions/cache@v3.0.5"
with:
path: "~/.cache/pre-commit"
key: "${{ runner.os }}-pre-commit-${{ matrix.toxenv }}-${{ hashFiles('.pre-commit-config.yaml') }}"
restore-keys: |
"${{ runner.os }}-pre-commit-${{ matrix.toxenv }}-"
"${{ runner.os }}-pre-commit-"
- name: "Install requirements"
id: "install-requirements"
run: "make install"
- name: "Run ${{ matrix.toxenv }}"
id: "run"
run: "tox -e ${{ matrix.toxenv }}"
42 changes: 42 additions & 0 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "coveralls"
on:
workflow_dispatch:
workflow_call:
env:
NAME: "pre-commit-config-shellcheck"
DEFAULT_PYTHON_VERSION: "3.10"
jobs:
coveralls:
name: "coveralls"
runs-on: "ubuntu-latest"
steps:
- name: "Git clone"
id: "git-clone"
uses: "actions/checkout@v3.0.2"
- name: "Set up Python ${{ env.DEFAULT_PYTHON_VERSION }}"
id: "set-up-python"
uses: "actions/setup-python@v4.1.0"
with:
python-version: "${{ env.DEFAULT_PYTHON_VERSION }}"
- name: "Pip cache"
id: "pip-cache"
uses: "actions/cache@v3.0.5"
with:
path: "~/.cache/pip"
key: "${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}"
restore-keys: |
"${{ runner.os }}-pip-"
- name: "Temporarily save coverage statistics"
id: "temporarily-save-coverage-statistics"
uses: "actions/cache@v3.0.5"
with:
path: ".coverage"
key: ".coverage-${{ github.run_id }}-${{ github.run_number }}"
- name: "Install requirements"
id: "install-requirements"
run: "make install"
- name: "Upload coverage report to Coveralls"
id: "upload-coverage-report-to-coveralls"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: "coveralls --service=github"
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "test"
on:
workflow_dispatch:
workflow_call:
env:
NAME: "pre-commit-config-shellcheck"
jobs:
test:
name: "${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- name: "Git clone"
id: "git-clone"
uses: "actions/checkout@v3.0.2"
- name: "Set up Python ${{ matrix.python-version }}"
id: "set-up-python"
uses: "actions/setup-python@v4.1.0"
with:
python-version: "${{ matrix.python-version }}"
- name: "Pip cache"
id: "pip-cache"
uses: "actions/cache@v3.0.5"
with:
path: "~/.cache/pip"
key: "${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.cfg') }}"
restore-keys: |
"${{ runner.os }}-pip-${{ matrix.python-version }}-"
"${{ runner.os }}-pip-"
- name: "Temporarily save coverage statistics"
id: "temporarily-save-coverage-statistics"
uses: "actions/cache@v3.0.5"
with:
path: ".coverage"
key: ".coverage-${{ github.run_id }}-${{ github.run_number }}"
- name: "Install requirements"
id: "install-requirements"
run: "make install"
- name: "Run tests"
id: "run-tests"
env:
PLATFORM: "${{ matrix.platform }}"
run: "make tox"
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ repos:
stages: [commit]
language: system
pass_filenames: false
entry: bash -c 'make build -B && check-wheel-contents dist'
entry: bash -c 'make build -B && check-wheel-contents dist -c setup.cfg'
types: [python]
- id: "dotenv-linter"
name: "dotenv-linter"
Expand Down
39 changes: 30 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
pre-commit-config-shellcheck documentation
==========================================

*pre-commit-config-shellcheck is a tool for checking entry points in pre-commit config with ShellCheck.*
|GitHub|_ |Coveralls|_ |pypi-license|_ |pypi-version|_ |pypi-python-version|_ |pypi-format|_ |pypi-wheel|_ |pypi-status|_

*pre-commit-config-shellcheck is a tool for checking entry points in pre-commit config with ShellCheck.*

Installation
------------

In order to use the tool you should first clone it from the source:

.. code-block:: bash
Expand All @@ -27,10 +27,8 @@ or
The installation is done and as simple as that.


Usage
-----

To run the program you should start it from terminal and provide with a config file to check:

.. code-block:: bash
Expand All @@ -45,11 +43,10 @@ You could change a default shellcheck call with directory access with the ``-s``
The output from tool usage is sent to the stdout or stderr depending on the operation result.


Contributing
------------

- Fork the repository
- `Fork it <https://github.com/Anadea/pre-commit-config-shellcheck/>`_
- Install `GNU Make <https://www.gnu.org/software/make/>`_
- Install and configure `pyenv <https://github.com/pyenv/pyenv/>`_ and `pyenv-virtualenv plugin <https://github.com/pyenv/pyenv-virtualenv/>`_
- Install and configure `direnv <https://github.com/direnv/direnv/>`_
Expand Down Expand Up @@ -89,20 +86,44 @@ Contributing
git push origin my-new-fix-or-feature
- Create a new Pull Request
- `Create a new Pull Request <https://github.com/Anadea/pre-commit-config-shellcheck/compare/>`_


Licensing
---------

pre-commit-config-shellcheck uses the MIT license. Please check the MIT-LICENSE file for more details.


Contacts
--------

**Project Website**: https://github.com/anadea/pre-commit-config-shellcheck/

**Author**: Anadea

For contributors list see CONTRIBUTORS file.


.. |GitHub| image:: https://github.com/Anadea/pre-commit-config-shellcheck/workflows/build/badge.svg
:alt: GitHub
.. |Coveralls| image:: https://coveralls.io/repos/github/Anadea/pre-commit-config-shellcheck/badge.svg?branch=master
:alt: Coveralls
.. |pypi-license| image:: https://img.shields.io/pypi/l/pre-commit-config-shellcheck
:alt: License
.. |pypi-version| image:: https://img.shields.io/pypi/v/pre-commit-config-shellcheck
:alt: Version
.. |pypi-python-version| image:: https://img.shields.io/pypi/pyversions/pre-commit-config-shellcheck
:alt: Supported Python version
.. |pypi-format| image:: https://img.shields.io/pypi/format/pre-commit-config-shellcheck
:alt: Package format
.. |pypi-wheel| image:: https://img.shields.io/pypi/wheel/pre-commit-config-shellcheck
:alt: Python wheel support
.. |pypi-status| image:: https://img.shields.io/pypi/status/pre-commit-config-shellcheck
:alt: Package status
.. _GitHub: https://github.com/Anadea/pre-commit-config-shellcheck/actions/
.. _Coveralls: https://coveralls.io/Anadea/pre-commit-config-shellcheck?branch=master
.. _pypi-license: https://pypi.org/project/pre-commit-config-shellcheck/
.. _pypi-version: https://pypi.org/project/pre-commit-config-shellcheck/
.. _pypi-python-version: https://pypi.org/project/pre-commit-config-shellcheck/
.. _pypi-format: https://pypi.org/project/pre-commit-config-shellcheck/
.. _pypi-wheel: https://pypi.org/project/pre-commit-config-shellcheck/
.. _pypi-status: https://pypi.org/project/pre-commit-config-shellcheck/
Loading

0 comments on commit 2b3c0d7

Please sign in to comment.