Skip to content

Commit 3a07f8e

Browse files
committed
[skip ci] Add pre-commit configuration.
1 parent a645c17 commit 3a07f8e

File tree

3 files changed

+41
-6
lines changed

3 files changed

+41
-6
lines changed

.pre-commit-config.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v2.4.0
6+
hooks:
7+
- id: check-merge-conflict
8+
- id: check-added-large-files
9+
- id: check-case-conflict
10+
- id: check-byte-order-marker
11+
- id: check-yaml
12+
- repo: local
13+
hooks:
14+
- id: lint
15+
name: Check scripts
16+
language: system
17+
types: [file, shell]
18+
entry: shellcheck
19+
pass_filenames: true

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning].
99
### Added
1010
- Travis CI shared configuration snippet intented to be sourced in user
1111
configuration (`dev.yml`).
12+
- pre-commit configuration file.
1213

1314
### Fixed
1415
- Filtering of daily build (available through Chocolatey) (#9).

README.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ Usage
3535
To be able to use _travis-python_, the Travis machine needs to be configured
3636
to be able to run in the three operating systems.
3737

38-
The easiest way to do it is to [import][travis-config-imports] the shared
39-
configuration snippet:
38+
The easiest way to do it is to [import the shared configuration snippet]:
4039

4140
```yaml
4241
import:
@@ -93,12 +92,26 @@ To solve those problems, some directions have been taken:
9392
Running tests
9493
-------------
9594

96-
Use [shellspec] to run unit tests:
95+
Use [Shellspec] to run unit tests:
9796

98-
```bash
97+
```console
9998
shellspec
10099
```
101100

101+
Development
102+
-----------
103+
104+
The following dependencies are required:
105+
- [ShellCheck] to lint shell scripts,
106+
- [Shellspec] to run units tests,
107+
- [Bash] to run the script.
108+
109+
Install the pre-commit hook within your repository:
110+
111+
```console
112+
poetry run pre-commit install
113+
```
114+
102115
Contributing
103116
------------
104117

@@ -130,5 +143,7 @@ License
130143
[ci]: https://travis-ci.org/neimad/travis-python
131144

132145
[travis-python-versions]: https://docs.travis-ci.com/user/languages/python/#specifying-python-versions
133-
[travis-config-imports]: https://docs.travis-ci.com/user/build-config-imports/
134-
[shellspec]: https://shellspec.info
146+
[import the shared configuration snippet]: https://docs.travis-ci.com/user/build-config-imports/
147+
[Shellspec]: https://shellspec.info/
148+
[ShellCheck]: https://www.shellcheck.net/
149+
[Bash]: https://www.gnu.org/software/bash/

0 commit comments

Comments
 (0)